diff --git a/.fern/metadata.json b/.fern/metadata.json new file mode 100644 index 00000000..32e9ea00 --- /dev/null +++ b/.fern/metadata.json @@ -0,0 +1,14 @@ +{ + "cliVersion": "1.2.0", + "generatorName": "fernapi/fern-typescript-sdk", + "generatorVersion": "3.32.0", + "generatorConfig": { + "namespaceExport": "Vapi", + "allowCustomFetcher": true, + "skipResponseValidation": true, + "includeApiReference": true, + "noSerdeLayer": true, + "omitUndefined": true, + "enableInlineTypes": false + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9424323c..2db61068 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,16 @@ jobs: uses: actions/checkout@v4 - name: Set up node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Install dependencies + run: pnpm install - name: Compile - run: yarn && yarn build + run: pnpm build test: runs-on: ubuntu-latest @@ -24,10 +30,16 @@ jobs: uses: actions/checkout@v4 - name: Set up node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 - - name: Compile - run: yarn && yarn test + - name: Install dependencies + run: pnpm install + + - name: Test + run: pnpm test publish: needs: [ compile, test ] @@ -36,22 +48,31 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 + - name: Set up node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + - name: Install dependencies - run: yarn install + run: pnpm install + - name: Build - run: yarn build + run: pnpm build - name: Publish to npm run: | npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} + publish() { # use latest npm to ensure OIDC support + npx -y npm@latest publish "$@" + } if [[ ${GITHUB_REF} == *alpha* ]]; then - npm publish --access public --tag alpha + publish --access public --tag alpha elif [[ ${GITHUB_REF} == *beta* ]]; then - npm publish --access public --tag beta + publish --access public --tag beta else - npm publish --access public + publish --access public fi env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 383dd369..00000000 --- a/.npmignore +++ /dev/null @@ -1,10 +0,0 @@ -node_modules -src -tests -.gitignore -.github -.fernignore -.prettierrc.yml -tsconfig.json -yarn.lock -pnpm-lock.yaml \ No newline at end of file diff --git a/.prettierrc.yml b/.prettierrc.yml deleted file mode 100644 index 0c06786b..00000000 --- a/.prettierrc.yml +++ /dev/null @@ -1,2 +0,0 @@ -tabWidth: 4 -printWidth: 120 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..fe5bc2f7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,133 @@ +# Contributing + +Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project. + +## Getting Started + +### Prerequisites + +- Node.js 20 or higher +- pnpm package manager + +### Installation + +Install the project dependencies: + +```bash +pnpm install +``` + +### Building + +Build the project: + +```bash +pnpm build +``` + +### Testing + +Run the test suite: + +```bash +pnpm test +``` + +Run specific test types: +- `pnpm test:unit` - Run unit tests +- `pnpm test:wire` - Run wire/integration tests + +### Linting and Formatting + +Check code style: + +```bash +pnpm run lint +pnpm run format:check +``` + +Fix code style issues: + +```bash +pnpm run lint:fix +pnpm run format:fix +``` + +Or use the combined check command: + +```bash +pnpm run check:fix +``` + +## About Generated Code + +**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated. + +### Generated Files + +The following directories contain generated code: +- `src/api/` - API client classes and types +- `src/serialization/` - Serialization/deserialization logic +- Most TypeScript files in `src/` + +### How to Customize + +If you need to customize the SDK, you have two options: + +#### Option 1: Use `.fernignore` + +For custom code that should persist across SDK regenerations: + +1. Create a `.fernignore` file in the project root +2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax) +3. Add your custom code to those files + +Files listed in `.fernignore` will not be overwritten when the SDK is regenerated. + +For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code). + +#### Option 2: Contribute to the Generator + +If you want to change how code is generated for all users of this SDK: + +1. The TypeScript SDK generator lives in the [Fern repository](https://github.com/fern-api/fern) +2. Generator code is located at `generators/typescript/sdk/` +3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md) +4. Submit a pull request with your changes to the generator + +This approach is best for: +- Bug fixes in generated code +- New features that would benefit all users +- Improvements to code generation patterns + +## Making Changes + +### Workflow + +1. Create a new branch for your changes +2. Make your modifications +3. Run tests to ensure nothing breaks: `pnpm test` +4. Run linting and formatting: `pnpm run check:fix` +5. Build the project: `pnpm build` +6. Commit your changes with a clear commit message +7. Push your branch and create a pull request + +### Commit Messages + +Write clear, descriptive commit messages that explain what changed and why. + +### Code Style + +This project uses automated code formatting and linting. Run `pnpm run check:fix` before committing to ensure your code meets the project's style guidelines. + +## Questions or Issues? + +If you have questions or run into issues: + +1. Check the [Fern documentation](https://buildwithfern.com) +2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues) +3. Open a new issue if your question hasn't been addressed + +## License + +By contributing to this project, you agree that your contributions will be licensed under the same license as the project. diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..a777468e --- /dev/null +++ b/biome.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.3.1/schema.json", + "root": true, + "vcs": { + "enabled": false + }, + "files": { + "ignoreUnknown": true, + "includes": [ + "**", + "!!dist", + "!!**/dist", + "!!lib", + "!!**/lib", + "!!_tmp_*", + "!!**/_tmp_*", + "!!*.tmp", + "!!**/*.tmp", + "!!.tmp/", + "!!**/.tmp/", + "!!*.log", + "!!**/*.log", + "!!**/.DS_Store", + "!!**/Thumbs.db" + ] + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 4, + "lineWidth": 120 + }, + "javascript": { + "formatter": { + "quoteStyle": "double" + } + }, + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": "on" + } + } + }, + "linter": { + "rules": { + "style": { + "useNodejsImportProtocol": "off" + }, + "suspicious": { + "noAssignInExpressions": "warn", + "noUselessEscapeInString": { + "level": "warn", + "fix": "none", + "options": {} + }, + "noThenProperty": "warn", + "useIterableCallbackReturn": "warn", + "noShadowRestrictedNames": "warn", + "noTsIgnore": { + "level": "warn", + "fix": "none", + "options": {} + }, + "noConfusingVoidType": { + "level": "warn", + "fix": "none", + "options": {} + } + } + } + } +} diff --git a/jest.config.mjs b/jest.config.mjs deleted file mode 100644 index b6927007..00000000 --- a/jest.config.mjs +++ /dev/null @@ -1,42 +0,0 @@ -/** @type {import('jest').Config} */ -export default { - preset: "ts-jest", - testEnvironment: "node", - projects: [ - { - displayName: "unit", - preset: "ts-jest", - testEnvironment: "node", - moduleNameMapper: { - "^(\.{1,2}/.*)\.js$": "$1", - }, - roots: ["/tests"], - testPathIgnorePatterns: ["\.browser\.(spec|test)\.[jt]sx?$", "/tests/wire/"], - setupFilesAfterEnv: [], - }, - { - displayName: "browser", - preset: "ts-jest", - testEnvironment: "/tests/BrowserTestEnvironment.ts", - moduleNameMapper: { - "^(\.{1,2}/.*)\.js$": "$1", - }, - roots: ["/tests"], - testMatch: ["/tests/unit/**/?(*.)+(browser).(spec|test).[jt]s?(x)"], - setupFilesAfterEnv: [], - }, - , - { - displayName: "wire", - preset: "ts-jest", - testEnvironment: "node", - moduleNameMapper: { - "^(\.{1,2}/.*)\.js$": "$1", - }, - roots: ["/tests/wire"], - setupFilesAfterEnv: ["/tests/mock-server/setup.ts"], - }, - ], - workerThreads: false, - passWithNoTests: true, -}; diff --git a/package.json b/package.json index fec19a95..ca4ac44f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vapi-ai/server-sdk", - "version": "0.10.4", + "version": "0.10.3", "private": false, "repository": "github:VapiAI/server-sdk-typescript", "type": "commonjs", @@ -29,27 +29,28 @@ "LICENSE" ], "scripts": { - "format": "prettier . --write --ignore-unknown", - "build": "yarn build:cjs && yarn build:esm", + "format": "biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none", + "format:check": "biome format --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none", + "lint": "biome lint --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none", + "lint:fix": "biome lint --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none", + "check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none", + "check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none", + "build": "pnpm build:cjs && pnpm build:esm", "build:cjs": "tsc --project ./tsconfig.cjs.json", "build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm", - "test": "jest --config jest.config.mjs", - "test:unit": "jest --selectProjects unit", - "test:browser": "jest --selectProjects browser", - "test:wire": "jest --selectProjects wire" + "test": "vitest", + "test:unit": "vitest --project unit", + "test:wire": "vitest --project wire" }, + "dependencies": {}, "devDependencies": { "webpack": "^5.97.1", "ts-loader": "^9.5.1", - "jest": "^29.7.0", - "@jest/globals": "^29.7.0", - "@types/jest": "^29.5.14", - "ts-jest": "^29.3.4", - "jest-environment-jsdom": "^29.7.0", - "msw": "^2.8.4", + "vitest": "^3.2.4", + "msw": "2.11.2", "@types/node": "^18.19.70", - "prettier": "^3.4.2", - "typescript": "~5.7.2" + "typescript": "~5.7.2", + "@biomejs/biome": "2.3.1" }, "browser": { "fs": false, @@ -57,7 +58,7 @@ "path": false, "stream": false }, - "packageManager": "yarn@1.22.22", + "packageManager": "pnpm@10.20.0", "engines": { "node": ">=18.0.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..74e31fda --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2132 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@biomejs/biome': + specifier: 2.3.1 + version: 2.3.1 + '@types/node': + specifier: ^18.19.70 + version: 18.19.130 + msw: + specifier: 2.11.2 + version: 2.11.2(@types/node@18.19.130)(typescript@5.7.3) + ts-loader: + specifier: ^9.5.1 + version: 9.5.4(typescript@5.7.3)(webpack@5.103.0) + typescript: + specifier: ~5.7.2 + version: 5.7.3 + vitest: + specifier: ^3.2.4 + version: 3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.44.1) + webpack: + specifier: ^5.97.1 + version: 5.103.0 + +packages: + + '@biomejs/biome@2.3.1': + resolution: {integrity: sha512-A29evf1R72V5bo4o2EPxYMm5mtyGvzp2g+biZvRFx29nWebGyyeOSsDWGx3tuNNMFRepGwxmA9ZQ15mzfabK2w==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@2.3.1': + resolution: {integrity: sha512-ombSf3MnTUueiYGN1SeI9tBCsDUhpWzOwS63Dove42osNh0PfE1cUtHFx6eZ1+MYCCLwXzlFlYFdrJ+U7h6LcA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@2.3.1': + resolution: {integrity: sha512-pcOfwyoQkrkbGvXxRvZNe5qgD797IowpJPovPX5biPk2FwMEV+INZqfCaz4G5bVq9hYnjwhRMamg11U4QsRXrQ==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@2.3.1': + resolution: {integrity: sha512-+DZYv8l7FlUtTrWs1Tdt1KcNCAmRO87PyOnxKGunbWm5HKg1oZBSbIIPkjrCtDZaeqSG1DiGx7qF+CPsquQRcg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@2.3.1': + resolution: {integrity: sha512-td5O8pFIgLs8H1sAZsD6v+5quODihyEw4nv2R8z7swUfIK1FKk+15e4eiYVLcAE4jUqngvh4j3JCNgg0Y4o4IQ==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@2.3.1': + resolution: {integrity: sha512-Y3Ob4nqgv38Mh+6EGHltuN+Cq8aj/gyMTJYzkFZV2AEj+9XzoXB9VNljz9pjfFNHUxvLEV4b55VWyxozQTBaUQ==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@2.3.1': + resolution: {integrity: sha512-PYWgEO7up7XYwSAArOpzsVCiqxBCXy53gsReAb1kKYIyXaoAlhBaBMvxR/k2Rm9aTuZ662locXUmPk/Aj+Xu+Q==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@2.3.1': + resolution: {integrity: sha512-RHIG/zgo+69idUqVvV3n8+j58dKYABRpMyDmfWu2TITC+jwGPiEaT0Q3RKD+kQHiS80mpBrST0iUGeEXT0bU9A==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@2.3.1': + resolution: {integrity: sha512-izl30JJ5Dp10mi90Eko47zhxE6pYyWPcnX1NQxKpL/yMhXxf95oLTzfpu4q+MDBh/gemNqyJEwjBpe0MT5iWPA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + + '@bundled-es-modules/cookie@2.0.1': + resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==} + + '@bundled-es-modules/statuses@1.0.1': + resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} + + '@esbuild/aix-ppc64@0.25.12': + resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.25.12': + resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.25.12': + resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.25.12': + resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.25.12': + resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.25.12': + resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.25.12': + resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.25.12': + resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.25.12': + resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.25.12': + resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.25.12': + resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.25.12': + resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.25.12': + resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.25.12': + resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.25.12': + resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.25.12': + resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.25.12': + resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.25.12': + resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.12': + resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.25.12': + resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.25.12': + resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.25.12': + resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.25.12': + resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.25.12': + resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.25.12': + resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.25.12': + resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@inquirer/ansi@1.0.2': + resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==} + engines: {node: '>=18'} + + '@inquirer/confirm@5.1.21': + resolution: {integrity: sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/core@10.3.2': + resolution: {integrity: sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/figures@1.0.15': + resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==} + engines: {node: '>=18'} + + '@inquirer/type@3.0.10': + resolution: {integrity: sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.11': + resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@mswjs/interceptors@0.39.8': + resolution: {integrity: sha512-2+BzZbjRO7Ct61k8fMNHEtoKjeWI9pIlHFTqBwZ5icHpqszIgEZbjb1MW5Z0+bITTCTl3gk4PDBxs9tA/csXvA==} + engines: {node: '>=18'} + + '@open-draft/deferred-promise@2.2.0': + resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} + + '@open-draft/logger@0.3.0': + resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==} + + '@open-draft/until@2.1.0': + resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + + '@rollup/rollup-android-arm-eabi@4.53.3': + resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.53.3': + resolution: {integrity: sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.53.3': + resolution: {integrity: sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.53.3': + resolution: {integrity: sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.53.3': + resolution: {integrity: sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.53.3': + resolution: {integrity: sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.53.3': + resolution: {integrity: sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.53.3': + resolution: {integrity: sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.53.3': + resolution: {integrity: sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.53.3': + resolution: {integrity: sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loong64-gnu@4.53.3': + resolution: {integrity: sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-ppc64-gnu@4.53.3': + resolution: {integrity: sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.53.3': + resolution: {integrity: sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.53.3': + resolution: {integrity: sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.53.3': + resolution: {integrity: sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.53.3': + resolution: {integrity: sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.53.3': + resolution: {integrity: sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openharmony-arm64@4.53.3': + resolution: {integrity: sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.53.3': + resolution: {integrity: sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.53.3': + resolution: {integrity: sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.53.3': + resolution: {integrity: sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.53.3': + resolution: {integrity: sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==} + cpu: [x64] + os: [win32] + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/eslint-scope@3.7.7': + resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} + + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} + + '@types/estree@1.0.8': + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/node@18.19.130': + resolution: {integrity: sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==} + + '@types/statuses@2.0.6': + resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} + + '@vitest/expect@3.2.4': + resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} + + '@vitest/mocker@3.2.4': + resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@3.2.4': + resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} + + '@vitest/runner@3.2.4': + resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} + + '@vitest/snapshot@3.2.4': + resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} + + '@vitest/spy@3.2.4': + resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} + + '@vitest/utils@3.2.4': + resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} + + '@webassemblyjs/ast@1.14.1': + resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} + + '@webassemblyjs/floating-point-hex-parser@1.13.2': + resolution: {integrity: sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==} + + '@webassemblyjs/helper-api-error@1.13.2': + resolution: {integrity: sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==} + + '@webassemblyjs/helper-buffer@1.14.1': + resolution: {integrity: sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==} + + '@webassemblyjs/helper-numbers@1.13.2': + resolution: {integrity: sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==} + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': + resolution: {integrity: sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==} + + '@webassemblyjs/helper-wasm-section@1.14.1': + resolution: {integrity: sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==} + + '@webassemblyjs/ieee754@1.13.2': + resolution: {integrity: sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==} + + '@webassemblyjs/leb128@1.13.2': + resolution: {integrity: sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==} + + '@webassemblyjs/utf8@1.13.2': + resolution: {integrity: sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==} + + '@webassemblyjs/wasm-edit@1.14.1': + resolution: {integrity: sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==} + + '@webassemblyjs/wasm-gen@1.14.1': + resolution: {integrity: sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==} + + '@webassemblyjs/wasm-opt@1.14.1': + resolution: {integrity: sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==} + + '@webassemblyjs/wasm-parser@1.14.1': + resolution: {integrity: sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==} + + '@webassemblyjs/wast-printer@1.14.1': + resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} + + '@xtuc/ieee754@1.2.0': + resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} + + '@xtuc/long@4.2.2': + resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} + + acorn-import-phases@1.0.4: + resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==} + engines: {node: '>=10.13.0'} + peerDependencies: + acorn: ^8.14.0 + + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv-formats@2.1.1: + resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-keywords@5.1.0: + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} + peerDependencies: + ajv: ^8.8.2 + + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + baseline-browser-mapping@2.8.29: + resolution: {integrity: sha512-sXdt2elaVnhpDNRDz+1BDx1JQoJRuNk7oVlAlbGiFkLikHCAQiccexF/9e91zVi6RCgqspl04aP+6Cnl9zRLrA==} + hasBin: true + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.28.0: + resolution: {integrity: sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + caniuse-lite@1.0.30001756: + resolution: {integrity: sha512-4HnCNKbMLkLdhJz3TToeVWHSnfJvPaq6vu/eRP0Ahub/07n484XHhBF5AJoSGHdVrS8tKFauUQz8Bp9P7LVx7A==} + + chai@5.3.3: + resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} + engines: {node: '>=18'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + + chrome-trace-event@1.0.4: + resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} + engines: {node: '>=6.0'} + + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + + electron-to-chromium@1.5.256: + resolution: {integrity: sha512-uqYq1IQhpXXLX+HgiXdyOZml7spy4xfy42yPxcCCRjswp0fYM2X+JwCON07lqnpLEGVCj739B7Yr+FngmHBMEQ==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + enhanced-resolve@5.18.3: + resolution: {integrity: sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==} + engines: {node: '>=10.13.0'} + + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + + esbuild@0.25.12: + resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + expect-type@1.2.2: + resolution: {integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==} + engines: {node: '>=12.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-uri@3.1.0: + resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + graphql@16.12.0: + resolution: {integrity: sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==} + engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + headers-polyfill@4.0.3: + resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-node-process@1.2.0: + resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + jest-worker@27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} + + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + loader-runner@4.3.1: + resolution: {integrity: sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==} + engines: {node: '>=6.11.5'} + + loupe@3.2.1: + resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + msw@2.11.2: + resolution: {integrity: sha512-MI54hLCsrMwiflkcqlgYYNJJddY5/+S0SnONvhv1owOplvqohKSQyGejpNdUGyCwgs4IH7PqaNbPw/sKOEze9Q==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + typescript: '>= 4.8.x' + peerDependenciesMeta: + typescript: + optional: true + + mute-stream@2.0.0: + resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} + engines: {node: ^18.17.0 || >=20.5.0} + + nanoid@3.3.11: + resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + node-releases@2.0.27: + resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} + + outvariant@1.4.3: + resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} + + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + pathval@2.0.1: + resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} + engines: {node: '>= 14.16'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + picomatch@4.0.3: + resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + engines: {node: '>=12'} + + postcss@8.5.6: + resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} + engines: {node: ^10 || ^12 || >=14} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + rettime@0.7.0: + resolution: {integrity: sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw==} + + rollup@4.53.3: + resolution: {integrity: sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + schema-utils@4.3.3: + resolution: {integrity: sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==} + engines: {node: '>= 10.13.0'} + + semver@7.7.3: + resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} + engines: {node: '>=10'} + hasBin: true + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + source-map@0.7.6: + resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} + engines: {node: '>= 12'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + + strict-event-emitter@0.5.1: + resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-literal@3.1.0: + resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + tapable@2.3.0: + resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} + engines: {node: '>=6'} + + terser-webpack-plugin@5.3.14: + resolution: {integrity: sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true + + terser@5.44.1: + resolution: {integrity: sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==} + engines: {node: '>=10'} + hasBin: true + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.15: + resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + engines: {node: '>=12.0.0'} + + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} + engines: {node: '>=14.0.0'} + + tinyspy@4.0.4: + resolution: {integrity: sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==} + engines: {node: '>=14.0.0'} + + tldts-core@7.0.18: + resolution: {integrity: sha512-jqJC13oP4FFAahv4JT/0WTDrCF9Okv7lpKtOZUGPLiAnNbACcSg8Y8T+Z9xthOmRBqi/Sob4yi0TE0miRCvF7Q==} + + tldts@7.0.18: + resolution: {integrity: sha512-lCcgTAgMxQ1JKOWrVGo6E69Ukbnx4Gc1wiYLRf6J5NN4HRYJtCby1rPF8rkQ4a6qqoFBK5dvjJ1zJ0F7VfDSvw==} + hasBin: true + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tough-cookie@6.0.0: + resolution: {integrity: sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==} + engines: {node: '>=16'} + + ts-loader@9.5.4: + resolution: {integrity: sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ==} + engines: {node: '>=12.0.0'} + peerDependencies: + typescript: '*' + webpack: ^5.0.0 + + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + + update-browserslist-db@1.1.4: + resolution: {integrity: sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + + vite@7.2.2: + resolution: {integrity: sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@3.2.4: + resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.2.4 + '@vitest/ui': 3.2.4 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/debug': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + watchpack@2.4.4: + resolution: {integrity: sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==} + engines: {node: '>=10.13.0'} + + webpack-sources@3.3.3: + resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==} + engines: {node: '>=10.13.0'} + + webpack@5.103.0: + resolution: {integrity: sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yoctocolors-cjs@2.1.3: + resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==} + engines: {node: '>=18'} + +snapshots: + + '@biomejs/biome@2.3.1': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 2.3.1 + '@biomejs/cli-darwin-x64': 2.3.1 + '@biomejs/cli-linux-arm64': 2.3.1 + '@biomejs/cli-linux-arm64-musl': 2.3.1 + '@biomejs/cli-linux-x64': 2.3.1 + '@biomejs/cli-linux-x64-musl': 2.3.1 + '@biomejs/cli-win32-arm64': 2.3.1 + '@biomejs/cli-win32-x64': 2.3.1 + + '@biomejs/cli-darwin-arm64@2.3.1': + optional: true + + '@biomejs/cli-darwin-x64@2.3.1': + optional: true + + '@biomejs/cli-linux-arm64-musl@2.3.1': + optional: true + + '@biomejs/cli-linux-arm64@2.3.1': + optional: true + + '@biomejs/cli-linux-x64-musl@2.3.1': + optional: true + + '@biomejs/cli-linux-x64@2.3.1': + optional: true + + '@biomejs/cli-win32-arm64@2.3.1': + optional: true + + '@biomejs/cli-win32-x64@2.3.1': + optional: true + + '@bundled-es-modules/cookie@2.0.1': + dependencies: + cookie: 0.7.2 + + '@bundled-es-modules/statuses@1.0.1': + dependencies: + statuses: 2.0.2 + + '@esbuild/aix-ppc64@0.25.12': + optional: true + + '@esbuild/android-arm64@0.25.12': + optional: true + + '@esbuild/android-arm@0.25.12': + optional: true + + '@esbuild/android-x64@0.25.12': + optional: true + + '@esbuild/darwin-arm64@0.25.12': + optional: true + + '@esbuild/darwin-x64@0.25.12': + optional: true + + '@esbuild/freebsd-arm64@0.25.12': + optional: true + + '@esbuild/freebsd-x64@0.25.12': + optional: true + + '@esbuild/linux-arm64@0.25.12': + optional: true + + '@esbuild/linux-arm@0.25.12': + optional: true + + '@esbuild/linux-ia32@0.25.12': + optional: true + + '@esbuild/linux-loong64@0.25.12': + optional: true + + '@esbuild/linux-mips64el@0.25.12': + optional: true + + '@esbuild/linux-ppc64@0.25.12': + optional: true + + '@esbuild/linux-riscv64@0.25.12': + optional: true + + '@esbuild/linux-s390x@0.25.12': + optional: true + + '@esbuild/linux-x64@0.25.12': + optional: true + + '@esbuild/netbsd-arm64@0.25.12': + optional: true + + '@esbuild/netbsd-x64@0.25.12': + optional: true + + '@esbuild/openbsd-arm64@0.25.12': + optional: true + + '@esbuild/openbsd-x64@0.25.12': + optional: true + + '@esbuild/openharmony-arm64@0.25.12': + optional: true + + '@esbuild/sunos-x64@0.25.12': + optional: true + + '@esbuild/win32-arm64@0.25.12': + optional: true + + '@esbuild/win32-ia32@0.25.12': + optional: true + + '@esbuild/win32-x64@0.25.12': + optional: true + + '@inquirer/ansi@1.0.2': {} + + '@inquirer/confirm@5.1.21(@types/node@18.19.130)': + dependencies: + '@inquirer/core': 10.3.2(@types/node@18.19.130) + '@inquirer/type': 3.0.10(@types/node@18.19.130) + optionalDependencies: + '@types/node': 18.19.130 + + '@inquirer/core@10.3.2(@types/node@18.19.130)': + dependencies: + '@inquirer/ansi': 1.0.2 + '@inquirer/figures': 1.0.15 + '@inquirer/type': 3.0.10(@types/node@18.19.130) + cli-width: 4.1.0 + mute-stream: 2.0.0 + signal-exit: 4.1.0 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.3 + optionalDependencies: + '@types/node': 18.19.130 + + '@inquirer/figures@1.0.15': {} + + '@inquirer/type@3.0.10(@types/node@18.19.130)': + optionalDependencies: + '@types/node': 18.19.130 + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/source-map@0.3.11': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@mswjs/interceptors@0.39.8': + dependencies: + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/logger': 0.3.0 + '@open-draft/until': 2.1.0 + is-node-process: 1.2.0 + outvariant: 1.4.3 + strict-event-emitter: 0.5.1 + + '@open-draft/deferred-promise@2.2.0': {} + + '@open-draft/logger@0.3.0': + dependencies: + is-node-process: 1.2.0 + outvariant: 1.4.3 + + '@open-draft/until@2.1.0': {} + + '@rollup/rollup-android-arm-eabi@4.53.3': + optional: true + + '@rollup/rollup-android-arm64@4.53.3': + optional: true + + '@rollup/rollup-darwin-arm64@4.53.3': + optional: true + + '@rollup/rollup-darwin-x64@4.53.3': + optional: true + + '@rollup/rollup-freebsd-arm64@4.53.3': + optional: true + + '@rollup/rollup-freebsd-x64@4.53.3': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.53.3': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.53.3': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.53.3': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.53.3': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.53.3': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.53.3': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.53.3': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.53.3': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.53.3': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.53.3': + optional: true + + '@rollup/rollup-linux-x64-musl@4.53.3': + optional: true + + '@rollup/rollup-openharmony-arm64@4.53.3': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.53.3': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.53.3': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.53.3': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.53.3': + optional: true + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/cookie@0.6.0': {} + + '@types/deep-eql@4.0.2': {} + + '@types/eslint-scope@3.7.7': + dependencies: + '@types/eslint': 9.6.1 + '@types/estree': 1.0.8 + + '@types/eslint@9.6.1': + dependencies: + '@types/estree': 1.0.8 + '@types/json-schema': 7.0.15 + + '@types/estree@1.0.8': {} + + '@types/json-schema@7.0.15': {} + + '@types/node@18.19.130': + dependencies: + undici-types: 5.26.5 + + '@types/statuses@2.0.6': {} + + '@vitest/expect@3.2.4': + dependencies: + '@types/chai': 5.2.3 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.3.3 + tinyrainbow: 2.0.0 + + '@vitest/mocker@3.2.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(vite@7.2.2(@types/node@18.19.130)(terser@5.44.1))': + dependencies: + '@vitest/spy': 3.2.4 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + msw: 2.11.2(@types/node@18.19.130)(typescript@5.7.3) + vite: 7.2.2(@types/node@18.19.130)(terser@5.44.1) + + '@vitest/pretty-format@3.2.4': + dependencies: + tinyrainbow: 2.0.0 + + '@vitest/runner@3.2.4': + dependencies: + '@vitest/utils': 3.2.4 + pathe: 2.0.3 + strip-literal: 3.1.0 + + '@vitest/snapshot@3.2.4': + dependencies: + '@vitest/pretty-format': 3.2.4 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@3.2.4': + dependencies: + tinyspy: 4.0.4 + + '@vitest/utils@3.2.4': + dependencies: + '@vitest/pretty-format': 3.2.4 + loupe: 3.2.1 + tinyrainbow: 2.0.0 + + '@webassemblyjs/ast@1.14.1': + dependencies: + '@webassemblyjs/helper-numbers': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + + '@webassemblyjs/floating-point-hex-parser@1.13.2': {} + + '@webassemblyjs/helper-api-error@1.13.2': {} + + '@webassemblyjs/helper-buffer@1.14.1': {} + + '@webassemblyjs/helper-numbers@1.13.2': + dependencies: + '@webassemblyjs/floating-point-hex-parser': 1.13.2 + '@webassemblyjs/helper-api-error': 1.13.2 + '@xtuc/long': 4.2.2 + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': {} + + '@webassemblyjs/helper-wasm-section@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/wasm-gen': 1.14.1 + + '@webassemblyjs/ieee754@1.13.2': + dependencies: + '@xtuc/ieee754': 1.2.0 + + '@webassemblyjs/leb128@1.13.2': + dependencies: + '@xtuc/long': 4.2.2 + + '@webassemblyjs/utf8@1.13.2': {} + + '@webassemblyjs/wasm-edit@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/helper-wasm-section': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-opt': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + '@webassemblyjs/wast-printer': 1.14.1 + + '@webassemblyjs/wasm-gen@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wasm-opt@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + + '@webassemblyjs/wasm-parser@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-api-error': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wast-printer@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@xtuc/long': 4.2.2 + + '@xtuc/ieee754@1.2.0': {} + + '@xtuc/long@4.2.2': {} + + acorn-import-phases@1.0.4(acorn@8.15.0): + dependencies: + acorn: 8.15.0 + + acorn@8.15.0: {} + + ajv-formats@2.1.1(ajv@8.17.1): + optionalDependencies: + ajv: 8.17.1 + + ajv-keywords@5.1.0(ajv@8.17.1): + dependencies: + ajv: 8.17.1 + fast-deep-equal: 3.1.3 + + ajv@8.17.1: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.0 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + assertion-error@2.0.1: {} + + baseline-browser-mapping@2.8.29: {} + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.28.0: + dependencies: + baseline-browser-mapping: 2.8.29 + caniuse-lite: 1.0.30001756 + electron-to-chromium: 1.5.256 + node-releases: 2.0.27 + update-browserslist-db: 1.1.4(browserslist@4.28.0) + + buffer-from@1.1.2: {} + + cac@6.7.14: {} + + caniuse-lite@1.0.30001756: {} + + chai@5.3.3: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.2.1 + pathval: 2.0.1 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + check-error@2.1.1: {} + + chrome-trace-event@1.0.4: {} + + cli-width@4.1.0: {} + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + commander@2.20.3: {} + + cookie@0.7.2: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + deep-eql@5.0.2: {} + + electron-to-chromium@1.5.256: {} + + emoji-regex@8.0.0: {} + + enhanced-resolve@5.18.3: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.0 + + es-module-lexer@1.7.0: {} + + esbuild@0.25.12: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.12 + '@esbuild/android-arm': 0.25.12 + '@esbuild/android-arm64': 0.25.12 + '@esbuild/android-x64': 0.25.12 + '@esbuild/darwin-arm64': 0.25.12 + '@esbuild/darwin-x64': 0.25.12 + '@esbuild/freebsd-arm64': 0.25.12 + '@esbuild/freebsd-x64': 0.25.12 + '@esbuild/linux-arm': 0.25.12 + '@esbuild/linux-arm64': 0.25.12 + '@esbuild/linux-ia32': 0.25.12 + '@esbuild/linux-loong64': 0.25.12 + '@esbuild/linux-mips64el': 0.25.12 + '@esbuild/linux-ppc64': 0.25.12 + '@esbuild/linux-riscv64': 0.25.12 + '@esbuild/linux-s390x': 0.25.12 + '@esbuild/linux-x64': 0.25.12 + '@esbuild/netbsd-arm64': 0.25.12 + '@esbuild/netbsd-x64': 0.25.12 + '@esbuild/openbsd-arm64': 0.25.12 + '@esbuild/openbsd-x64': 0.25.12 + '@esbuild/openharmony-arm64': 0.25.12 + '@esbuild/sunos-x64': 0.25.12 + '@esbuild/win32-arm64': 0.25.12 + '@esbuild/win32-ia32': 0.25.12 + '@esbuild/win32-x64': 0.25.12 + + escalade@3.2.0: {} + + eslint-scope@5.1.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@4.3.0: {} + + estraverse@5.3.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.8 + + events@3.3.0: {} + + expect-type@1.2.2: {} + + fast-deep-equal@3.1.3: {} + + fast-uri@3.1.0: {} + + fdir@6.5.0(picomatch@4.0.3): + optionalDependencies: + picomatch: 4.0.3 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + fsevents@2.3.3: + optional: true + + get-caller-file@2.0.5: {} + + glob-to-regexp@0.4.1: {} + + graceful-fs@4.2.11: {} + + graphql@16.12.0: {} + + has-flag@4.0.0: {} + + headers-polyfill@4.0.3: {} + + is-fullwidth-code-point@3.0.0: {} + + is-node-process@1.2.0: {} + + is-number@7.0.0: {} + + jest-worker@27.5.1: + dependencies: + '@types/node': 18.19.130 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + js-tokens@9.0.1: {} + + json-parse-even-better-errors@2.3.1: {} + + json-schema-traverse@1.0.0: {} + + loader-runner@4.3.1: {} + + loupe@3.2.1: {} + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + merge-stream@2.0.0: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + ms@2.1.3: {} + + msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3): + dependencies: + '@bundled-es-modules/cookie': 2.0.1 + '@bundled-es-modules/statuses': 1.0.1 + '@inquirer/confirm': 5.1.21(@types/node@18.19.130) + '@mswjs/interceptors': 0.39.8 + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.6 + graphql: 16.12.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + rettime: 0.7.0 + strict-event-emitter: 0.5.1 + tough-cookie: 6.0.0 + type-fest: 4.41.0 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - '@types/node' + + mute-stream@2.0.0: {} + + nanoid@3.3.11: {} + + neo-async@2.6.2: {} + + node-releases@2.0.27: {} + + outvariant@1.4.3: {} + + path-to-regexp@6.3.0: {} + + pathe@2.0.3: {} + + pathval@2.0.1: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + picomatch@4.0.3: {} + + postcss@8.5.6: + dependencies: + nanoid: 3.3.11 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + rettime@0.7.0: {} + + rollup@4.53.3: + dependencies: + '@types/estree': 1.0.8 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.53.3 + '@rollup/rollup-android-arm64': 4.53.3 + '@rollup/rollup-darwin-arm64': 4.53.3 + '@rollup/rollup-darwin-x64': 4.53.3 + '@rollup/rollup-freebsd-arm64': 4.53.3 + '@rollup/rollup-freebsd-x64': 4.53.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.53.3 + '@rollup/rollup-linux-arm-musleabihf': 4.53.3 + '@rollup/rollup-linux-arm64-gnu': 4.53.3 + '@rollup/rollup-linux-arm64-musl': 4.53.3 + '@rollup/rollup-linux-loong64-gnu': 4.53.3 + '@rollup/rollup-linux-ppc64-gnu': 4.53.3 + '@rollup/rollup-linux-riscv64-gnu': 4.53.3 + '@rollup/rollup-linux-riscv64-musl': 4.53.3 + '@rollup/rollup-linux-s390x-gnu': 4.53.3 + '@rollup/rollup-linux-x64-gnu': 4.53.3 + '@rollup/rollup-linux-x64-musl': 4.53.3 + '@rollup/rollup-openharmony-arm64': 4.53.3 + '@rollup/rollup-win32-arm64-msvc': 4.53.3 + '@rollup/rollup-win32-ia32-msvc': 4.53.3 + '@rollup/rollup-win32-x64-gnu': 4.53.3 + '@rollup/rollup-win32-x64-msvc': 4.53.3 + fsevents: 2.3.3 + + safe-buffer@5.2.1: {} + + schema-utils@4.3.3: + dependencies: + '@types/json-schema': 7.0.15 + ajv: 8.17.1 + ajv-formats: 2.1.1(ajv@8.17.1) + ajv-keywords: 5.1.0(ajv@8.17.1) + + semver@7.7.3: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + siginfo@2.0.0: {} + + signal-exit@4.1.0: {} + + source-map-js@1.2.1: {} + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + source-map@0.7.6: {} + + stackback@0.0.2: {} + + statuses@2.0.2: {} + + std-env@3.10.0: {} + + strict-event-emitter@0.5.1: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-literal@3.1.0: + dependencies: + js-tokens: 9.0.1 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + tapable@2.3.0: {} + + terser-webpack-plugin@5.3.14(webpack@5.103.0): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + jest-worker: 27.5.1 + schema-utils: 4.3.3 + serialize-javascript: 6.0.2 + terser: 5.44.1 + webpack: 5.103.0 + + terser@5.44.1: + dependencies: + '@jridgewell/source-map': 0.3.11 + acorn: 8.15.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + tinybench@2.9.0: {} + + tinyexec@0.3.2: {} + + tinyglobby@0.2.15: + dependencies: + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + + tinypool@1.1.1: {} + + tinyrainbow@2.0.0: {} + + tinyspy@4.0.4: {} + + tldts-core@7.0.18: {} + + tldts@7.0.18: + dependencies: + tldts-core: 7.0.18 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tough-cookie@6.0.0: + dependencies: + tldts: 7.0.18 + + ts-loader@9.5.4(typescript@5.7.3)(webpack@5.103.0): + dependencies: + chalk: 4.1.2 + enhanced-resolve: 5.18.3 + micromatch: 4.0.8 + semver: 7.7.3 + source-map: 0.7.6 + typescript: 5.7.3 + webpack: 5.103.0 + + type-fest@4.41.0: {} + + typescript@5.7.3: {} + + undici-types@5.26.5: {} + + update-browserslist-db@1.1.4(browserslist@4.28.0): + dependencies: + browserslist: 4.28.0 + escalade: 3.2.0 + picocolors: 1.1.1 + + vite-node@3.2.4(@types/node@18.19.130)(terser@5.44.1): + dependencies: + cac: 6.7.14 + debug: 4.4.3 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 7.2.2(@types/node@18.19.130)(terser@5.44.1) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + vite@7.2.2(@types/node@18.19.130)(terser@5.44.1): + dependencies: + esbuild: 0.25.12 + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + postcss: 8.5.6 + rollup: 4.53.3 + tinyglobby: 0.2.15 + optionalDependencies: + '@types/node': 18.19.130 + fsevents: 2.3.3 + terser: 5.44.1 + + vitest@3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.44.1): + dependencies: + '@types/chai': 5.2.3 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(vite@7.2.2(@types/node@18.19.130)(terser@5.44.1)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.3.3 + debug: 4.4.3 + expect-type: 1.2.2 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.15 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 + vite: 7.2.2(@types/node@18.19.130)(terser@5.44.1) + vite-node: 3.2.4(@types/node@18.19.130)(terser@5.44.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 18.19.130 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + watchpack@2.4.4: + dependencies: + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + + webpack-sources@3.3.3: {} + + webpack@5.103.0: + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.8 + '@types/json-schema': 7.0.15 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.15.0 + acorn-import-phases: 1.0.4(acorn@8.15.0) + browserslist: 4.28.0 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.18.3 + es-module-lexer: 1.7.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.1 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 4.3.3 + tapable: 2.3.0 + terser-webpack-plugin: 5.3.14(webpack@5.103.0) + watchpack: 2.4.4 + webpack-sources: 3.3.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yoctocolors-cjs@2.1.3: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 00000000..6e4c3951 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1 @@ +packages: ['.'] \ No newline at end of file diff --git a/reference.md b/reference.md index 530ea8e7..869d2951 100644 --- a/reference.md +++ b/reference.md @@ -1,7 +1,5 @@ # Reference - ## Assistants -
client.assistants.list({ ...params }) -> Vapi.Assistant[]
@@ -15,19 +13,9 @@
```typescript -await client.assistants.list({ - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.assistants.list(); +```
@@ -41,21 +29,22 @@ await client.assistants.list({
-**request:** `Vapi.AssistantsListRequest` - +**request:** `Vapi.ListAssistantsRequest` +
-**requestOptions:** `Assistants.RequestOptions` - +**requestOptions:** `AssistantsClient.RequestOptions` +
+
@@ -74,8 +63,8 @@ await client.assistants.list({ ```typescript await client.assistants.create({}); -``` +``` @@ -89,26 +78,27 @@ await client.assistants.create({});
-**request:** `Vapi.CreateAssistantDto` - +**request:** `Vapi.CreateAssistantDto` +
-**requestOptions:** `Assistants.RequestOptions` - +**requestOptions:** `AssistantsClient.RequestOptions` +
+ -
client.assistants.get(id) -> Vapi.Assistant +
client.assistants.get({ ...params }) -> Vapi.Assistant
@@ -121,9 +111,11 @@ await client.assistants.create({});
```typescript -await client.assistants.get("id"); -``` +await client.assistants.get({ + id: "id" +}); +```
@@ -137,26 +129,27 @@ await client.assistants.get("id");
-**id:** `string` - +**request:** `Vapi.GetAssistantsRequest` +
-**requestOptions:** `Assistants.RequestOptions` - +**requestOptions:** `AssistantsClient.RequestOptions` +
+
-
client.assistants.delete(id) -> Vapi.Assistant +
client.assistants.delete({ ...params }) -> Vapi.Assistant
@@ -169,9 +162,11 @@ await client.assistants.get("id");
```typescript -await client.assistants.delete("id"); -``` +await client.assistants.delete({ + id: "id" +}); +```
@@ -185,26 +180,27 @@ await client.assistants.delete("id");
-**id:** `string` - +**request:** `Vapi.DeleteAssistantsRequest` +
-**requestOptions:** `Assistants.RequestOptions` - +**requestOptions:** `AssistantsClient.RequestOptions` +
+
-
client.assistants.update(id, { ...params }) -> Vapi.Assistant +
client.assistants.update({ ...params }) -> Vapi.Assistant
@@ -217,9 +213,11 @@ await client.assistants.delete("id");
```typescript -await client.assistants.update("id"); -``` +await client.assistants.update({ + id: "id" +}); +```
@@ -233,35 +231,27 @@ await client.assistants.update("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.UpdateAssistantDto` - +**request:** `Vapi.UpdateAssistantDto` +
-**requestOptions:** `Assistants.RequestOptions` - +**requestOptions:** `AssistantsClient.RequestOptions` +
+
## Squads -
client.squads.list({ ...params }) -> Vapi.Squad[]
@@ -275,19 +265,9 @@ await client.assistants.update("id");
```typescript -await client.squads.list({ - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.squads.list(); +```
@@ -301,21 +281,22 @@ await client.squads.list({
-**request:** `Vapi.SquadsListRequest` - +**request:** `Vapi.ListSquadsRequest` +
-**requestOptions:** `Squads.RequestOptions` - +**requestOptions:** `SquadsClient.RequestOptions` +
+
@@ -334,10 +315,10 @@ await client.squads.list({ ```typescript await client.squads.create({ - members: [{}], + members: [{}] }); -``` +``` @@ -351,26 +332,27 @@ await client.squads.create({
-**request:** `Vapi.CreateSquadDto` - +**request:** `Vapi.CreateSquadDto` +
-**requestOptions:** `Squads.RequestOptions` - +**requestOptions:** `SquadsClient.RequestOptions` +
+
-
client.squads.get(id) -> Vapi.Squad +
client.squads.get({ ...params }) -> Vapi.Squad
@@ -383,9 +365,11 @@ await client.squads.create({
```typescript -await client.squads.get("id"); -``` +await client.squads.get({ + id: "id" +}); +```
@@ -399,26 +383,27 @@ await client.squads.get("id");
-**id:** `string` - +**request:** `Vapi.GetSquadsRequest` +
-**requestOptions:** `Squads.RequestOptions` - +**requestOptions:** `SquadsClient.RequestOptions` +
+
-
client.squads.delete(id) -> Vapi.Squad +
client.squads.delete({ ...params }) -> Vapi.Squad
@@ -431,9 +416,11 @@ await client.squads.get("id");
```typescript -await client.squads.delete("id"); -``` +await client.squads.delete({ + id: "id" +}); +```
@@ -447,26 +434,27 @@ await client.squads.delete("id");
-**id:** `string` - +**request:** `Vapi.DeleteSquadsRequest` +
-**requestOptions:** `Squads.RequestOptions` - +**requestOptions:** `SquadsClient.RequestOptions` +
+
-
client.squads.update(id, { ...params }) -> Vapi.Squad +
client.squads.update({ ...params }) -> Vapi.Squad
@@ -479,11 +467,12 @@ await client.squads.delete("id");
```typescript -await client.squads.update("id", { - members: [{}], +await client.squads.update({ + id: "id", + members: [{}] }); -``` +```
@@ -497,35 +486,27 @@ await client.squads.update("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.UpdateSquadDto` - +**request:** `Vapi.UpdateSquadDto` +
-**requestOptions:** `Squads.RequestOptions` - +**requestOptions:** `SquadsClient.RequestOptions` +
+
## Calls -
client.calls.list({ ...params }) -> Vapi.Call[]
@@ -539,22 +520,9 @@ await client.squads.update("id", {
```typescript -await client.calls.list({ - id: "id", - assistantId: "assistantId", - phoneNumberId: "phoneNumberId", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.calls.list(); +```
@@ -568,26 +536,27 @@ await client.calls.list({
-**request:** `Vapi.CallsListRequest` - +**request:** `Vapi.ListCallsRequest` +
-**requestOptions:** `Calls.RequestOptions` - +**requestOptions:** `CallsClient.RequestOptions` +
+
-
client.calls.create({ ...params }) -> Vapi.CallsCreateResponse +
client.calls.create({ ...params }) -> Vapi.CreateCallsResponse
@@ -601,8 +570,8 @@ await client.calls.list({ ```typescript await client.calls.create(); -``` +```
@@ -616,21 +585,22 @@ await client.calls.create();
-**request:** `Vapi.CreateCallDto` - +**request:** `Vapi.CreateCallDto` +
-**requestOptions:** `Calls.RequestOptions` - +**requestOptions:** `CallsClient.RequestOptions` +
+
@@ -648,30 +618,9 @@ await client.calls.create();
```typescript -await client.calls.callControllerFindAllPaginated({ - assistantId: "assistantId", - assistantName: "assistantName", - id: "id", - costLe: 1.1, - costGe: 1.1, - cost: 1.1, - successEvaluation: "successEvaluation", - endedReason: "endedReason", - phoneNumberId: "phoneNumberId", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.calls.callControllerFindAllPaginated(); +```
@@ -685,26 +634,27 @@ await client.calls.callControllerFindAllPaginated({
-**request:** `Vapi.CallControllerFindAllPaginatedRequest` - +**request:** `Vapi.CallControllerFindAllPaginatedRequest` +
-**requestOptions:** `Calls.RequestOptions` - +**requestOptions:** `CallsClient.RequestOptions` +
+
-
client.calls.get(id) -> Vapi.Call +
client.calls.get({ ...params }) -> Vapi.Call
@@ -717,9 +667,11 @@ await client.calls.callControllerFindAllPaginated({
```typescript -await client.calls.get("id"); -``` +await client.calls.get({ + id: "id" +}); +```
@@ -733,26 +685,27 @@ await client.calls.get("id");
-**id:** `string` - +**request:** `Vapi.GetCallsRequest` +
-**requestOptions:** `Calls.RequestOptions` - +**requestOptions:** `CallsClient.RequestOptions` +
+
-
client.calls.delete(id, { ...params }) -> Vapi.Call +
client.calls.delete({ ...params }) -> Vapi.Call
@@ -765,9 +718,11 @@ await client.calls.get("id");
```typescript -await client.calls.delete("id"); -``` +await client.calls.delete({ + id: "id" +}); +```
@@ -781,34 +736,27 @@ await client.calls.delete("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.DeleteCallDto` - +**request:** `Vapi.DeleteCallDto` +
-**requestOptions:** `Calls.RequestOptions` - +**requestOptions:** `CallsClient.RequestOptions` +
+
-
client.calls.update(id, { ...params }) -> Vapi.Call +
client.calls.update({ ...params }) -> Vapi.Call
@@ -821,9 +769,11 @@ await client.calls.delete("id");
```typescript -await client.calls.update("id"); -``` +await client.calls.update({ + id: "id" +}); +```
@@ -837,35 +787,27 @@ await client.calls.update("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.UpdateCallDto` - +**request:** `Vapi.UpdateCallDto` +
-**requestOptions:** `Calls.RequestOptions` - +**requestOptions:** `CallsClient.RequestOptions` +
+
## Chats -
client.chats.list({ ...params }) -> Vapi.ChatPaginatedResponse
@@ -879,25 +821,9 @@ await client.calls.update("id");
```typescript -await client.chats.list({ - assistantId: "assistantId", - squadId: "squadId", - workflowId: "workflowId", - sessionId: "sessionId", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.chats.list(); +```
@@ -911,26 +837,27 @@ await client.chats.list({
-**request:** `Vapi.ChatsListRequest` - +**request:** `Vapi.ListChatsRequest` +
-**requestOptions:** `Chats.RequestOptions` - +**requestOptions:** `ChatsClient.RequestOptions` +
+
-
client.chats.create({ ...params }) -> Vapi.ChatsCreateResponse +
client.chats.create({ ...params }) -> Vapi.CreateChatsResponse
@@ -943,7 +870,6 @@ await client.chats.list({
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). -
@@ -959,10 +885,10 @@ Creates a new chat with optional SMS delivery via transport field. Requires at l ```typescript await client.chats.create({ - input: "input", + input: "input" }); -``` +``` @@ -976,26 +902,27 @@ await client.chats.create({
-**request:** `Vapi.CreateChatDto` - +**request:** `Vapi.CreateChatDto` +
-**requestOptions:** `Chats.RequestOptions` - +**requestOptions:** `ChatsClient.RequestOptions` +
+
-
client.chats.get(id) -> Vapi.Chat +
client.chats.get({ ...params }) -> Vapi.Chat
@@ -1008,9 +935,11 @@ await client.chats.create({
```typescript -await client.chats.get("id"); -``` +await client.chats.get({ + id: "id" +}); +```
@@ -1024,26 +953,27 @@ await client.chats.get("id");
-**id:** `string` - +**request:** `Vapi.GetChatsRequest` +
-**requestOptions:** `Chats.RequestOptions` - +**requestOptions:** `ChatsClient.RequestOptions` +
+
-
client.chats.delete(id) -> Vapi.Chat +
client.chats.delete({ ...params }) -> Vapi.Chat
@@ -1056,9 +986,11 @@ await client.chats.get("id");
```typescript -await client.chats.delete("id"); -``` +await client.chats.delete({ + id: "id" +}); +```
@@ -1072,26 +1004,27 @@ await client.chats.delete("id");
-**id:** `string` - +**request:** `Vapi.DeleteChatsRequest` +
-**requestOptions:** `Chats.RequestOptions` - +**requestOptions:** `ChatsClient.RequestOptions` +
+
-
client.chats.createResponse({ ...params }) -> Vapi.ChatsCreateResponseResponse +
client.chats.createResponse({ ...params }) -> Vapi.CreateResponseChatsResponse
@@ -1105,10 +1038,10 @@ await client.chats.delete("id"); ```typescript await client.chats.createResponse({ - input: "input", + input: "input" }); -``` +```
@@ -1122,27 +1055,27 @@ await client.chats.createResponse({
-**request:** `Vapi.OpenAiResponsesRequest` - +**request:** `Vapi.OpenAiResponsesRequest` +
-**requestOptions:** `Chats.RequestOptions` - +**requestOptions:** `ChatsClient.RequestOptions` +
+
## Campaigns -
client.campaigns.campaignControllerFindAll({ ...params }) -> Vapi.CampaignPaginatedResponse
@@ -1156,23 +1089,9 @@ await client.chats.createResponse({
```typescript -await client.campaigns.campaignControllerFindAll({ - id: "id", - status: "scheduled", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.campaigns.campaignControllerFindAll(); +```
@@ -1186,21 +1105,22 @@ await client.campaigns.campaignControllerFindAll({
-**request:** `Vapi.CampaignControllerFindAllRequest` - +**request:** `Vapi.CampaignControllerFindAllRequest` +
-**requestOptions:** `Campaigns.RequestOptions` - +**requestOptions:** `CampaignsClient.RequestOptions` +
+
@@ -1221,10 +1141,10 @@ await client.campaigns.campaignControllerFindAll({ await client.campaigns.campaignControllerCreate({ name: "Q2 Sales Campaign", phoneNumberId: "phoneNumberId", - customers: [{}], + customers: [{}] }); -``` +``` @@ -1238,26 +1158,27 @@ await client.campaigns.campaignControllerCreate({
-**request:** `Vapi.CreateCampaignDto` - +**request:** `Vapi.CreateCampaignDto` +
-**requestOptions:** `Campaigns.RequestOptions` - +**requestOptions:** `CampaignsClient.RequestOptions` +
+
-
client.campaigns.campaignControllerFindOne(id) -> Vapi.Campaign +
client.campaigns.campaignControllerFindOne({ ...params }) -> Vapi.Campaign
@@ -1270,9 +1191,11 @@ await client.campaigns.campaignControllerCreate({
```typescript -await client.campaigns.campaignControllerFindOne("id"); -``` +await client.campaigns.campaignControllerFindOne({ + id: "id" +}); +```
@@ -1286,26 +1209,27 @@ await client.campaigns.campaignControllerFindOne("id");
-**id:** `string` - +**request:** `Vapi.CampaignControllerFindOneRequest` +
-**requestOptions:** `Campaigns.RequestOptions` - +**requestOptions:** `CampaignsClient.RequestOptions` +
+
-
client.campaigns.campaignControllerRemove(id) -> Vapi.Campaign +
client.campaigns.campaignControllerRemove({ ...params }) -> Vapi.Campaign
@@ -1318,9 +1242,11 @@ await client.campaigns.campaignControllerFindOne("id");
```typescript -await client.campaigns.campaignControllerRemove("id"); -``` +await client.campaigns.campaignControllerRemove({ + id: "id" +}); +```
@@ -1334,26 +1260,27 @@ await client.campaigns.campaignControllerRemove("id");
-**id:** `string` - +**request:** `Vapi.CampaignControllerRemoveRequest` +
-**requestOptions:** `Campaigns.RequestOptions` - +**requestOptions:** `CampaignsClient.RequestOptions` +
+
-
client.campaigns.campaignControllerUpdate(id, { ...params }) -> Vapi.Campaign +
client.campaigns.campaignControllerUpdate({ ...params }) -> Vapi.Campaign
@@ -1366,9 +1293,11 @@ await client.campaigns.campaignControllerRemove("id");
```typescript -await client.campaigns.campaignControllerUpdate("id"); -``` +await client.campaigns.campaignControllerUpdate({ + id: "id" +}); +```
@@ -1382,35 +1311,27 @@ await client.campaigns.campaignControllerUpdate("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.UpdateCampaignDto` - +**request:** `Vapi.UpdateCampaignDto` +
-**requestOptions:** `Campaigns.RequestOptions` - +**requestOptions:** `CampaignsClient.RequestOptions` +
+
## Sessions -
client.sessions.list({ ...params }) -> Vapi.SessionPaginatedResponse
@@ -1424,25 +1345,9 @@ await client.campaigns.campaignControllerUpdate("id");
```typescript -await client.sessions.list({ - name: "name", - assistantId: "assistantId", - squadId: "squadId", - workflowId: "workflowId", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.sessions.list(); +```
@@ -1456,21 +1361,22 @@ await client.sessions.list({
-**request:** `Vapi.SessionsListRequest` - +**request:** `Vapi.ListSessionsRequest` +
-**requestOptions:** `Sessions.RequestOptions` - +**requestOptions:** `SessionsClient.RequestOptions` +
+
@@ -1489,8 +1395,8 @@ await client.sessions.list({ ```typescript await client.sessions.create(); -``` +``` @@ -1504,26 +1410,27 @@ await client.sessions.create();
-**request:** `Vapi.CreateSessionDto` - +**request:** `Vapi.CreateSessionDto` +
-**requestOptions:** `Sessions.RequestOptions` - +**requestOptions:** `SessionsClient.RequestOptions` +
+
-
client.sessions.get(id) -> Vapi.Session +
client.sessions.get({ ...params }) -> Vapi.Session
@@ -1536,9 +1443,11 @@ await client.sessions.create();
```typescript -await client.sessions.get("id"); -``` +await client.sessions.get({ + id: "id" +}); +```
@@ -1552,26 +1461,27 @@ await client.sessions.get("id");
-**id:** `string` - +**request:** `Vapi.GetSessionsRequest` +
-**requestOptions:** `Sessions.RequestOptions` - +**requestOptions:** `SessionsClient.RequestOptions` +
+
-
client.sessions.delete(id) -> Vapi.Session +
client.sessions.delete({ ...params }) -> Vapi.Session
@@ -1584,9 +1494,11 @@ await client.sessions.get("id");
```typescript -await client.sessions.delete("id"); -``` +await client.sessions.delete({ + id: "id" +}); +```
@@ -1600,26 +1512,27 @@ await client.sessions.delete("id");
-**id:** `string` - +**request:** `Vapi.DeleteSessionsRequest` +
-**requestOptions:** `Sessions.RequestOptions` - +**requestOptions:** `SessionsClient.RequestOptions` +
+
-
client.sessions.update(id, { ...params }) -> Vapi.Session +
client.sessions.update({ ...params }) -> Vapi.Session
@@ -1632,9 +1545,11 @@ await client.sessions.delete("id");
```typescript -await client.sessions.update("id"); -``` +await client.sessions.update({ + id: "id" +}); +```
@@ -1648,36 +1563,28 @@ await client.sessions.update("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.UpdateSessionDto` - +**request:** `Vapi.UpdateSessionDto` +
-**requestOptions:** `Sessions.RequestOptions` - +**requestOptions:** `SessionsClient.RequestOptions` +
+
## PhoneNumbers - -
client.phoneNumbers.list({ ...params }) -> Vapi.PhoneNumbersListResponseItem[] +
client.phoneNumbers.list({ ...params }) -> Vapi.ListPhoneNumbersResponseItem[]
@@ -1690,19 +1597,9 @@ await client.sessions.update("id");
```typescript -await client.phoneNumbers.list({ - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.phoneNumbers.list(); +```
@@ -1716,26 +1613,27 @@ await client.phoneNumbers.list({
-**request:** `Vapi.PhoneNumbersListRequest` - +**request:** `Vapi.ListPhoneNumbersRequest` +
-**requestOptions:** `PhoneNumbers.RequestOptions` - +**requestOptions:** `PhoneNumbersClient.RequestOptions` +
+
-
client.phoneNumbers.create({ ...params }) -> Vapi.PhoneNumbersCreateResponse +
client.phoneNumbers.create({ ...params }) -> Vapi.CreatePhoneNumbersResponse
@@ -1750,10 +1648,10 @@ await client.phoneNumbers.list({ ```typescript await client.phoneNumbers.create({ provider: "byo-phone-number", - credentialId: "credentialId", + credentialId: "credentialId" }); -``` +```
@@ -1767,21 +1665,22 @@ await client.phoneNumbers.create({
-**request:** `Vapi.PhoneNumbersCreateRequest` - +**request:** `Vapi.CreatePhoneNumbersRequest` +
-**requestOptions:** `PhoneNumbers.RequestOptions` - +**requestOptions:** `PhoneNumbersClient.RequestOptions` +
+
@@ -1799,22 +1698,9 @@ await client.phoneNumbers.create({
```typescript -await client.phoneNumbers.phoneNumberControllerFindAllPaginated({ - search: "search", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.phoneNumbers.phoneNumberControllerFindAllPaginated(); +```
@@ -1828,26 +1714,27 @@ await client.phoneNumbers.phoneNumberControllerFindAllPaginated({
-**request:** `Vapi.PhoneNumberControllerFindAllPaginatedRequest` - +**request:** `Vapi.PhoneNumberControllerFindAllPaginatedRequest` +
-**requestOptions:** `PhoneNumbers.RequestOptions` - +**requestOptions:** `PhoneNumbersClient.RequestOptions` +
+
-
client.phoneNumbers.get(id) -> Vapi.PhoneNumbersGetResponse +
client.phoneNumbers.get({ ...params }) -> Vapi.GetPhoneNumbersResponse
@@ -1860,9 +1747,11 @@ await client.phoneNumbers.phoneNumberControllerFindAllPaginated({
```typescript -await client.phoneNumbers.get("id"); -``` +await client.phoneNumbers.get({ + id: "id" +}); +```
@@ -1876,26 +1765,27 @@ await client.phoneNumbers.get("id");
-**id:** `string` - +**request:** `Vapi.GetPhoneNumbersRequest` +
-**requestOptions:** `PhoneNumbers.RequestOptions` - +**requestOptions:** `PhoneNumbersClient.RequestOptions` +
+
-
client.phoneNumbers.delete(id) -> Vapi.PhoneNumbersDeleteResponse +
client.phoneNumbers.delete({ ...params }) -> Vapi.DeletePhoneNumbersResponse
@@ -1908,9 +1798,11 @@ await client.phoneNumbers.get("id");
```typescript -await client.phoneNumbers.delete("id"); -``` +await client.phoneNumbers.delete({ + id: "id" +}); +```
@@ -1924,26 +1816,27 @@ await client.phoneNumbers.delete("id");
-**id:** `string` - +**request:** `Vapi.DeletePhoneNumbersRequest` +
-**requestOptions:** `PhoneNumbers.RequestOptions` - +**requestOptions:** `PhoneNumbersClient.RequestOptions` +
+
-
client.phoneNumbers.update(id, { ...params }) -> Vapi.PhoneNumbersUpdateResponse +
client.phoneNumbers.update({ ...params }) -> Vapi.UpdatePhoneNumbersResponse
@@ -1956,9 +1849,12 @@ await client.phoneNumbers.delete("id");
```typescript -await client.phoneNumbers.update("id", {}); -``` +await client.phoneNumbers.update({ + id: "id", + body: {} +}); +```
@@ -1972,36 +1868,28 @@ await client.phoneNumbers.update("id", {});
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.PhoneNumbersUpdateRequest` - +**request:** `Vapi.UpdatePhoneNumbersRequest` +
-**requestOptions:** `PhoneNumbers.RequestOptions` - +**requestOptions:** `PhoneNumbersClient.RequestOptions` +
+
## Tools - -
client.tools.list({ ...params }) -> Vapi.ToolsListResponseItem[] +
client.tools.list({ ...params }) -> Vapi.ListToolsResponseItem[]
@@ -2014,19 +1902,9 @@ await client.phoneNumbers.update("id", {});
```typescript -await client.tools.list({ - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.tools.list(); +```
@@ -2040,26 +1918,27 @@ await client.tools.list({
-**request:** `Vapi.ToolsListRequest` - +**request:** `Vapi.ListToolsRequest` +
-**requestOptions:** `Tools.RequestOptions` - +**requestOptions:** `ToolsClient.RequestOptions` +
+
-
client.tools.create({ ...params }) -> Vapi.ToolsCreateResponse +
client.tools.create({ ...params }) -> Vapi.CreateToolsResponse
@@ -2075,10 +1954,10 @@ await client.tools.list({ await client.tools.create({ type: "apiRequest", method: "POST", - url: "url", + url: "url" }); -``` +```
@@ -2092,26 +1971,27 @@ await client.tools.create({
-**request:** `Vapi.ToolsCreateRequest` - +**request:** `Vapi.CreateToolsRequest` +
-**requestOptions:** `Tools.RequestOptions` - +**requestOptions:** `ToolsClient.RequestOptions` +
+
-
client.tools.get(id) -> Vapi.ToolsGetResponse +
client.tools.get({ ...params }) -> Vapi.GetToolsResponse
@@ -2124,9 +2004,11 @@ await client.tools.create({
```typescript -await client.tools.get("id"); -``` +await client.tools.get({ + id: "id" +}); +```
@@ -2140,26 +2022,27 @@ await client.tools.get("id");
-**id:** `string` - +**request:** `Vapi.GetToolsRequest` +
-**requestOptions:** `Tools.RequestOptions` - +**requestOptions:** `ToolsClient.RequestOptions` +
+
-
client.tools.delete(id) -> Vapi.ToolsDeleteResponse +
client.tools.delete({ ...params }) -> Vapi.DeleteToolsResponse
@@ -2172,9 +2055,11 @@ await client.tools.get("id");
```typescript -await client.tools.delete("id"); -``` +await client.tools.delete({ + id: "id" +}); +```
@@ -2188,26 +2073,27 @@ await client.tools.delete("id");
-**id:** `string` - +**request:** `Vapi.DeleteToolsRequest` +
-**requestOptions:** `Tools.RequestOptions` - +**requestOptions:** `ToolsClient.RequestOptions` +
+
-
client.tools.update(id, { ...params }) -> Vapi.ToolsUpdateResponse +
client.tools.update({ ...params }) -> Vapi.UpdateToolsResponse
@@ -2220,9 +2106,12 @@ await client.tools.delete("id");
```typescript -await client.tools.update("id", {}); -``` +await client.tools.update({ + id: "id", + body: {} +}); +```
@@ -2236,35 +2125,27 @@ await client.tools.update("id", {});
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.ToolsUpdateRequest` - +**request:** `Vapi.UpdateToolsRequest` +
-**requestOptions:** `Tools.RequestOptions` - +**requestOptions:** `ToolsClient.RequestOptions` +
+
## Files -
client.files.list() -> Vapi.File_[]
@@ -2279,8 +2160,8 @@ await client.tools.update("id", {}); ```typescript await client.files.list(); -``` +```
@@ -2294,13 +2175,14 @@ await client.files.list();
-**requestOptions:** `Files.RequestOptions` - +**requestOptions:** `FilesClient.RequestOptions` +
+
@@ -2319,10 +2201,10 @@ await client.files.list(); ```typescript await client.files.create({ - file: fs.createReadStream("/path/to/your/file"), + file: fs.createReadStream("/path/to/your/file") }); -``` +``` @@ -2336,26 +2218,27 @@ await client.files.create({
-**request:** `Vapi.CreateFileDto` - +**request:** `Vapi.CreateFileDto` +
-**requestOptions:** `Files.RequestOptions` - +**requestOptions:** `FilesClient.RequestOptions` +
+
-
client.files.get(id) -> Vapi.File_ +
client.files.get({ ...params }) -> Vapi.File_
@@ -2368,9 +2251,11 @@ await client.files.create({
```typescript -await client.files.get("id"); -``` +await client.files.get({ + id: "id" +}); +```
@@ -2384,26 +2269,27 @@ await client.files.get("id");
-**id:** `string` - +**request:** `Vapi.GetFilesRequest` +
-**requestOptions:** `Files.RequestOptions` - +**requestOptions:** `FilesClient.RequestOptions` +
+
-
client.files.delete(id) -> Vapi.File_ +
client.files.delete({ ...params }) -> Vapi.File_
@@ -2416,9 +2302,11 @@ await client.files.get("id");
```typescript -await client.files.delete("id"); -``` +await client.files.delete({ + id: "id" +}); +```
@@ -2432,26 +2320,27 @@ await client.files.delete("id");
-**id:** `string` - +**request:** `Vapi.DeleteFilesRequest` +
-**requestOptions:** `Files.RequestOptions` - +**requestOptions:** `FilesClient.RequestOptions` +
+
-
client.files.update(id, { ...params }) -> Vapi.File_ +
client.files.update({ ...params }) -> Vapi.File_
@@ -2464,9 +2353,11 @@ await client.files.delete("id");
```typescript -await client.files.update("id"); -``` +await client.files.update({ + id: "id" +}); +```
@@ -2480,35 +2371,27 @@ await client.files.update("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.UpdateFileDto` - +**request:** `Vapi.UpdateFileDto` +
-**requestOptions:** `Files.RequestOptions` - +**requestOptions:** `FilesClient.RequestOptions` +
+
## StructuredOutputs -
client.structuredOutputs.structuredOutputControllerFindAll({ ...params }) -> Vapi.StructuredOutputPaginatedResponse
@@ -2522,23 +2405,9 @@ await client.files.update("id");
```typescript -await client.structuredOutputs.structuredOutputControllerFindAll({ - id: "id", - name: "name", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", -}); -``` +await client.structuredOutputs.structuredOutputControllerFindAll(); +```
@@ -2552,21 +2421,22 @@ await client.structuredOutputs.structuredOutputControllerFindAll({
-**request:** `Vapi.StructuredOutputControllerFindAllRequest` - +**request:** `Vapi.StructuredOutputControllerFindAllRequest` +
-**requestOptions:** `StructuredOutputs.RequestOptions` - +**requestOptions:** `StructuredOutputsClient.RequestOptions` +
+
@@ -2587,11 +2457,11 @@ await client.structuredOutputs.structuredOutputControllerFindAll({ await client.structuredOutputs.structuredOutputControllerCreate({ name: "name", schema: { - type: "string", - }, + type: "string" + } }); -``` +``` @@ -2605,26 +2475,27 @@ await client.structuredOutputs.structuredOutputControllerCreate({
-**request:** `Vapi.CreateStructuredOutputDto` - +**request:** `Vapi.CreateStructuredOutputDto` +
-**requestOptions:** `StructuredOutputs.RequestOptions` - +**requestOptions:** `StructuredOutputsClient.RequestOptions` +
+
-
client.structuredOutputs.structuredOutputControllerFindOne(id) -> Vapi.StructuredOutput +
client.structuredOutputs.structuredOutputControllerFindOne({ ...params }) -> Vapi.StructuredOutput
@@ -2637,9 +2508,11 @@ await client.structuredOutputs.structuredOutputControllerCreate({
```typescript -await client.structuredOutputs.structuredOutputControllerFindOne("id"); -``` +await client.structuredOutputs.structuredOutputControllerFindOne({ + id: "id" +}); +```
@@ -2653,26 +2526,27 @@ await client.structuredOutputs.structuredOutputControllerFindOne("id");
-**id:** `string` - +**request:** `Vapi.StructuredOutputControllerFindOneRequest` +
-**requestOptions:** `StructuredOutputs.RequestOptions` - +**requestOptions:** `StructuredOutputsClient.RequestOptions` +
+
-
client.structuredOutputs.structuredOutputControllerRemove(id) -> Vapi.StructuredOutput +
client.structuredOutputs.structuredOutputControllerRemove({ ...params }) -> Vapi.StructuredOutput
@@ -2685,9 +2559,11 @@ await client.structuredOutputs.structuredOutputControllerFindOne("id");
```typescript -await client.structuredOutputs.structuredOutputControllerRemove("id"); -``` +await client.structuredOutputs.structuredOutputControllerRemove({ + id: "id" +}); +```
@@ -2701,26 +2577,27 @@ await client.structuredOutputs.structuredOutputControllerRemove("id");
-**id:** `string` - +**request:** `Vapi.StructuredOutputControllerRemoveRequest` +
-**requestOptions:** `StructuredOutputs.RequestOptions` - +**requestOptions:** `StructuredOutputsClient.RequestOptions` +
+
-
client.structuredOutputs.structuredOutputControllerUpdate(id, { ...params }) -> Vapi.StructuredOutput +
client.structuredOutputs.structuredOutputControllerUpdate({ ...params }) -> Vapi.StructuredOutput
@@ -2733,11 +2610,12 @@ await client.structuredOutputs.structuredOutputControllerRemove("id");
```typescript -await client.structuredOutputs.structuredOutputControllerUpdate("id", { - schemaOverride: "schemaOverride", +await client.structuredOutputs.structuredOutputControllerUpdate({ + id: "id", + schemaOverride: "schemaOverride" }); -``` +```
@@ -2751,36 +2629,27 @@ await client.structuredOutputs.structuredOutputControllerUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.UpdateStructuredOutputDto` - +**request:** `Vapi.UpdateStructuredOutputDto` +
-**requestOptions:** `StructuredOutputs.RequestOptions` - +**requestOptions:** `StructuredOutputsClient.RequestOptions` +
+
-## Eval - -
client.eval.evalControllerGetPaginated({ ...params }) -> Vapi.EvalPaginatedResponse +
client.structuredOutputs.structuredOutputControllerRun({ ...params }) -> Vapi.StructuredOutput
@@ -2793,22 +2662,11 @@ await client.structuredOutputs.structuredOutputControllerUpdate("id", {
```typescript -await client.eval.evalControllerGetPaginated({ - id: "id", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", +await client.structuredOutputs.structuredOutputControllerRun({ + callIds: ["callIds"] }); -``` +```
@@ -2822,29 +2680,44 @@ await client.eval.evalControllerGetPaginated({
-**request:** `Vapi.EvalControllerGetPaginatedRequest` - +**request:** `Vapi.StructuredOutputRunDto` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `StructuredOutputsClient.RequestOptions` +
+
-
client.eval.evalControllerCreate({ ...params }) -> Vapi.Eval +
client.structuredOutputs.structuredOutputControllerSuggest({ ...params }) -> Record[] +
+
+ +#### 📝 Description + +
+
+
+Analyzes assistant configuration and generates contextual structured output recommendations +
+
+
+
+ #### 🔌 Usage
@@ -2854,16 +2727,11 @@ await client.eval.evalControllerGetPaginated({
```typescript -await client.eval.evalControllerCreate({ - messages: [ - { - role: "assistant", - }, - ], - type: "chat.mockConversation", +await client.structuredOutputs.structuredOutputControllerSuggest({ + assistantId: "550e8400-e29b-41d4-a716-446655440000" }); -``` +```
@@ -2877,26 +2745,28 @@ await client.eval.evalControllerCreate({
-**request:** `Vapi.CreateEvalDto` - +**request:** `Vapi.GenerateStructuredOutputSuggestionsDto` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `StructuredOutputsClient.RequestOptions` +
+
-
client.eval.evalControllerGet(id) -> Vapi.Eval +## Insight +
client.insight.insightControllerFindAll({ ...params }) -> Vapi.InsightPaginatedResponse
@@ -2909,9 +2779,9 @@ await client.eval.evalControllerCreate({
```typescript -await client.eval.evalControllerGet("id"); -``` +await client.insight.insightControllerFindAll(); +```
@@ -2925,26 +2795,27 @@ await client.eval.evalControllerGet("id");
-**id:** `string` - +**request:** `Vapi.InsightControllerFindAllRequest` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `InsightClient.RequestOptions` +
+
-
client.eval.evalControllerRemove(id) -> Vapi.Eval +
client.insight.insightControllerCreate({ ...params }) -> Vapi.InsightControllerCreateResponse
@@ -2957,9 +2828,17 @@ await client.eval.evalControllerGet("id");
```typescript -await client.eval.evalControllerRemove("id"); -``` +await client.insight.insightControllerCreate({ + type: "bar", + queries: [{ + type: "vapiql-json", + table: "call", + column: "id", + operation: "count" + }] +}); +```
@@ -2973,26 +2852,27 @@ await client.eval.evalControllerRemove("id");
-**id:** `string` - +**request:** `Vapi.InsightControllerCreateRequest` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `InsightClient.RequestOptions` +
+
-
client.eval.evalControllerUpdate(id, { ...params }) -> Vapi.Eval +
client.insight.insightControllerFindOne({ ...params }) -> Vapi.InsightControllerFindOneResponse
@@ -3005,9 +2885,11 @@ await client.eval.evalControllerRemove("id");
```typescript -await client.eval.evalControllerUpdate("id"); -``` +await client.insight.insightControllerFindOne({ + id: "id" +}); +```
@@ -3021,34 +2903,27 @@ await client.eval.evalControllerUpdate("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Vapi.UpdateEvalDto` - +**request:** `Vapi.InsightControllerFindOneRequest` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `InsightClient.RequestOptions` +
+
-
client.eval.evalControllerGetRun(id) -> Vapi.EvalRun +
client.insight.insightControllerRemove({ ...params }) -> Vapi.InsightControllerRemoveResponse
@@ -3061,9 +2936,11 @@ await client.eval.evalControllerUpdate("id");
```typescript -await client.eval.evalControllerGetRun("id"); -``` +await client.insight.insightControllerRemove({ + id: "id" +}); +```
@@ -3077,26 +2954,27 @@ await client.eval.evalControllerGetRun("id");
-**id:** `string` - +**request:** `Vapi.InsightControllerRemoveRequest` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `InsightClient.RequestOptions` +
+
-
client.eval.evalControllerRemoveRun(id) -> Vapi.EvalRun +
client.insight.insightControllerUpdate({ ...params }) -> Vapi.InsightControllerUpdateResponse
@@ -3109,9 +2987,14 @@ await client.eval.evalControllerGetRun("id");
```typescript -await client.eval.evalControllerRemoveRun("id"); -``` +await client.insight.insightControllerUpdate({ + id: "id", + body: { + type: "bar" + } +}); +```
@@ -3125,26 +3008,27 @@ await client.eval.evalControllerRemoveRun("id");
-**id:** `string` - +**request:** `Vapi.InsightControllerUpdateRequest` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `InsightClient.RequestOptions` +
+
-
client.eval.evalControllerGetRunsPaginated({ ...params }) -> Vapi.EvalRunPaginatedResponse +
client.insight.insightControllerRun({ ...params }) -> Vapi.InsightRunResponse
@@ -3157,22 +3041,11 @@ await client.eval.evalControllerRemoveRun("id");
```typescript -await client.eval.evalControllerGetRunsPaginated({ - id: "id", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", +await client.insight.insightControllerRun({ + id: "id" }); -``` +```
@@ -3186,26 +3059,27 @@ await client.eval.evalControllerGetRunsPaginated({
-**request:** `Vapi.EvalControllerGetRunsPaginatedRequest` - +**request:** `Vapi.InsightRunDto` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `InsightClient.RequestOptions` +
+
-
client.eval.evalControllerRun({ ...params }) -> Record +
client.insight.insightControllerPreview({ ...params }) -> Vapi.InsightRunResponse
@@ -3218,13 +3092,17 @@ await client.eval.evalControllerGetRunsPaginated({
```typescript -await client.eval.evalControllerRun({ - target: { - type: "assistant", - }, +await client.insight.insightControllerPreview({ + type: "bar", + queries: [{ + type: "vapiql-json", + table: "call", + column: "id", + operation: "count" + }] }); -``` +```
@@ -3238,28 +3116,28 @@ await client.eval.evalControllerRun({
-**request:** `Vapi.CreateEvalRunDto` - +**request:** `Vapi.InsightControllerPreviewRequest` +
-**requestOptions:** `Eval.RequestOptions` - +**requestOptions:** `InsightClient.RequestOptions` +
+
-## ProviderResources - -
client.providerResources.providerResourceControllerGetProviderResourcesPaginated(provider, resourceName, { ...params }) -> Vapi.ProviderResourcePaginatedResponse +## Eval +
client.eval.evalControllerGetPaginated({ ...params }) -> Vapi.EvalPaginatedResponse
@@ -3272,27 +3150,9 @@ await client.eval.evalControllerRun({
```typescript -await client.providerResources.providerResourceControllerGetProviderResourcesPaginated( - "11labs", - "pronunciation-dictionary", - { - id: "id", - resourceId: "resourceId", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }, -); -``` +await client.eval.evalControllerGetPaginated(); +```
@@ -3306,42 +3166,27 @@ await client.providerResources.providerResourceControllerGetProviderResourcesPag
-**provider:** `"11labs"` — The provider (e.g., 11labs) - +**request:** `Vapi.EvalControllerGetPaginatedRequest` +
-**resourceName:** `"pronunciation-dictionary"` — The resource name (e.g., pronunciation-dictionary) - +**requestOptions:** `EvalClient.RequestOptions` +
- -
-
- -**request:** `Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequest` -
-
-
- -**requestOptions:** `ProviderResources.RequestOptions` - -
-
- -
-
client.providerResources.providerResourceControllerCreateProviderResource(provider, resourceName) -> Vapi.ProviderResource +
client.eval.evalControllerCreate({ ...params }) -> Vapi.Eval
@@ -3354,9 +3199,14 @@ await client.providerResources.providerResourceControllerGetProviderResourcesPag
```typescript -await client.providerResources.providerResourceControllerCreateProviderResource("11labs", "pronunciation-dictionary"); -``` +await client.eval.evalControllerCreate({ + messages: [{ + role: "assistant" + }], + type: "chat.mockConversation" +}); +```
@@ -3370,34 +3220,437 @@ await client.providerResources.providerResourceControllerCreateProviderResource(
-**provider:** `"11labs"` — The provider (e.g., 11labs) - +**request:** `Vapi.CreateEvalDto` +
-**resourceName:** `"pronunciation-dictionary"` — The resource name (e.g., pronunciation-dictionary) +**requestOptions:** `EvalClient.RequestOptions` + +
+
+ + + +
+
client.eval.evalControllerGet({ ...params }) -> Vapi.Eval
-**requestOptions:** `ProviderResources.RequestOptions` +#### 🔌 Usage -
+
+
+ +
+
+ +```typescript +await client.eval.evalControllerGet({ + id: "id" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.EvalControllerGetRequest` + +
+
+ +
+
+ +**requestOptions:** `EvalClient.RequestOptions` + +
+
+
+
+ + + +
+
+ +
client.eval.evalControllerRemove({ ...params }) -> Vapi.Eval +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.eval.evalControllerRemove({ + id: "id" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.EvalControllerRemoveRequest` + +
+
+ +
+
+ +**requestOptions:** `EvalClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.eval.evalControllerUpdate({ ...params }) -> Vapi.Eval +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.eval.evalControllerUpdate({ + id: "id" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.UpdateEvalDto` + +
+
+ +
+
+ +**requestOptions:** `EvalClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.eval.evalControllerGetRun({ ...params }) -> Vapi.EvalRun +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.eval.evalControllerGetRun({ + id: "id" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.EvalControllerGetRunRequest` + +
+
+ +
+
+ +**requestOptions:** `EvalClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.eval.evalControllerRemoveRun({ ...params }) -> Vapi.EvalRun +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.eval.evalControllerRemoveRun({ + id: "id" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.EvalControllerRemoveRunRequest` + +
+
+ +
+
+ +**requestOptions:** `EvalClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.eval.evalControllerGetRunsPaginated({ ...params }) -> Vapi.EvalRunPaginatedResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.eval.evalControllerGetRunsPaginated(); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.EvalControllerGetRunsPaginatedRequest` + +
+
+ +
+
+ +**requestOptions:** `EvalClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.eval.evalControllerRun({ ...params }) -> Record +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.eval.evalControllerRun({ + target: { + type: "assistant" + }, + type: "eval" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.CreateEvalRunDto` + +
+
+ +
+
+ +**requestOptions:** `EvalClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +## ObservabilityScorecard +
client.observabilityScorecard.scorecardControllerGet({ ...params }) -> Vapi.Scorecard +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.observabilityScorecard.scorecardControllerGet({ + id: "id" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.ScorecardControllerGetRequest` + +
+
+ +
+
+ +**requestOptions:** `ObservabilityScorecardClient.RequestOptions` + +
+
-
client.providerResources.providerResourceControllerGetProviderResource(provider, resourceName, id) -> Vapi.ProviderResource +
client.observabilityScorecard.scorecardControllerRemove({ ...params }) -> Vapi.Scorecard
@@ -3410,13 +3663,11 @@ await client.providerResources.providerResourceControllerCreateProviderResource(
```typescript -await client.providerResources.providerResourceControllerGetProviderResource( - "11labs", - "pronunciation-dictionary", - "id", -); -``` +await client.observabilityScorecard.scorecardControllerRemove({ + id: "id" +}); +```
@@ -3430,42 +3681,78 @@ await client.providerResources.providerResourceControllerGetProviderResource(
-**provider:** `"11labs"` — The provider (e.g., 11labs) - +**request:** `Vapi.ScorecardControllerRemoveRequest` +
-**resourceName:** `"pronunciation-dictionary"` — The resource name (e.g., pronunciation-dictionary) +**requestOptions:** `ObservabilityScorecardClient.RequestOptions` + +
+
+ + + +
+
client.observabilityScorecard.scorecardControllerUpdate({ ...params }) -> Vapi.Scorecard
-**id:** `string` +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.observabilityScorecard.scorecardControllerUpdate({ + id: "id" +}); +``` +
+
+#### ⚙️ Parameters + +
+
+
-**requestOptions:** `ProviderResources.RequestOptions` +**request:** `Vapi.UpdateScorecardDto` + +
+
+ +
+
+**requestOptions:** `ObservabilityScorecardClient.RequestOptions` +
+
-
client.providerResources.providerResourceControllerDeleteProviderResource(provider, resourceName, id) -> Vapi.ProviderResource +
client.observabilityScorecard.scorecardControllerGetPaginated({ ...params }) -> Vapi.ScorecardPaginatedResponse
@@ -3478,13 +3765,9 @@ await client.providerResources.providerResourceControllerGetProviderResource(
```typescript -await client.providerResources.providerResourceControllerDeleteProviderResource( - "11labs", - "pronunciation-dictionary", - "id", -); -``` +await client.observabilityScorecard.scorecardControllerGetPaginated(); +```
@@ -3498,42 +3781,136 @@ await client.providerResources.providerResourceControllerDeleteProviderResource(
-**provider:** `"11labs"` — The provider (e.g., 11labs) +**request:** `Vapi.ScorecardControllerGetPaginatedRequest` + +
+
+ +
+
+ +**requestOptions:** `ObservabilityScorecardClient.RequestOptions` + +
+
+ + + + + + +
+ +
client.observabilityScorecard.scorecardControllerCreate({ ...params }) -> Vapi.Scorecard +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.observabilityScorecard.scorecardControllerCreate({ + metrics: [{ + structuredOutputId: "structuredOutputId", + conditions: [{ + "key": "value" + }] + }] +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+**request:** `Vapi.CreateScorecardDto` +
-**resourceName:** `"pronunciation-dictionary"` — The resource name (e.g., pronunciation-dictionary) +**requestOptions:** `ObservabilityScorecardClient.RequestOptions` + +
+
+
+
+
+
+ +## ProviderResources +
client.providerResources.providerResourceControllerGetProviderResourcesPaginated({ ...params }) -> Vapi.ProviderResourcePaginatedResponse +
+
+ +#### 🔌 Usage + +
+
-**id:** `string` +```typescript +await client.providerResources.providerResourceControllerGetProviderResourcesPaginated({ + provider: "11labs", + resourceName: "pronunciation-dictionary" +}); +``` +
+
+#### ⚙️ Parameters + +
+
+
-**requestOptions:** `ProviderResources.RequestOptions` +**request:** `Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequest` + +
+
+ +
+
+**requestOptions:** `ProviderResourcesClient.RequestOptions` +
+
-
client.providerResources.providerResourceControllerUpdateProviderResource(provider, resourceName, id) -> Vapi.ProviderResource +
client.providerResources.providerResourceControllerCreateProviderResource({ ...params }) -> Vapi.ProviderResource
@@ -3546,13 +3923,65 @@ await client.providerResources.providerResourceControllerDeleteProviderResource(
```typescript -await client.providerResources.providerResourceControllerUpdateProviderResource( - "11labs", - "pronunciation-dictionary", - "id", -); +await client.providerResources.providerResourceControllerCreateProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary" +}); + ``` +
+
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.ProviderResourceControllerCreateProviderResourceRequest` + +
+
+ +
+
+ +**requestOptions:** `ProviderResourcesClient.RequestOptions` + +
+
+
+
+ + + + +
+ +
client.providerResources.providerResourceControllerGetProviderResource({ ...params }) -> Vapi.ProviderResource +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.providerResources.providerResourceControllerGetProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id" +}); +```
@@ -3566,43 +3995,133 @@ await client.providerResources.providerResourceControllerUpdateProviderResource(
-**provider:** `"11labs"` — The provider (e.g., 11labs) +**request:** `Vapi.ProviderResourceControllerGetProviderResourceRequest` + +
+
+ +
+
+ +**requestOptions:** `ProviderResourcesClient.RequestOptions` + +
+
+
+
+ + + + +
+ +
client.providerResources.providerResourceControllerDeleteProviderResource({ ...params }) -> Vapi.ProviderResource +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.providerResources.providerResourceControllerDeleteProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+**request:** `Vapi.ProviderResourceControllerDeleteProviderResourceRequest` +
-**resourceName:** `"pronunciation-dictionary"` — The resource name (e.g., pronunciation-dictionary) +**requestOptions:** `ProviderResourcesClient.RequestOptions` + +
+
+
+
+
+
+ +
client.providerResources.providerResourceControllerUpdateProviderResource({ ...params }) -> Vapi.ProviderResource +
+
+ +#### 🔌 Usage + +
+
-**id:** `string` +```typescript +await client.providerResources.providerResourceControllerUpdateProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id" +}); +``` +
+
+#### ⚙️ Parameters + +
+
+
-**requestOptions:** `ProviderResources.RequestOptions` +**request:** `Vapi.ProviderResourceControllerUpdateProviderResourceRequest` + +
+
+ +
+
+**requestOptions:** `ProviderResourcesClient.RequestOptions` +
+
## Analytics -
client.analytics.get({ ...params }) -> Vapi.AnalyticsQueryResult[]
@@ -3617,21 +4136,17 @@ await client.providerResources.providerResourceControllerUpdateProviderResource( ```typescript await client.analytics.get({ - queries: [ - { + queries: [{ table: "call", name: "name", - operations: [ - { + operations: [{ operation: "sum", - column: "id", - }, - ], - }, - ], + column: "id" + }] + }] }); -``` +```
@@ -3645,21 +4160,22 @@ await client.analytics.get({
-**request:** `Vapi.AnalyticsQueryDto` - +**request:** `Vapi.AnalyticsQueryDto` +
-**requestOptions:** `Analytics.RequestOptions` - +**requestOptions:** `AnalyticsClient.RequestOptions` +
+
diff --git a/src/BaseClient.ts b/src/BaseClient.ts new file mode 100644 index 00000000..2345234e --- /dev/null +++ b/src/BaseClient.ts @@ -0,0 +1,56 @@ +// This file was auto-generated by Fern from our API Definition. + +import { mergeHeaders } from "./core/headers.js"; +import * as core from "./core/index.js"; +import type * as environments from "./environments.js"; + +export interface BaseClientOptions { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + token: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | null | undefined>; + /** The default maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The default number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */ + fetch?: typeof fetch; + fetcher?: core.FetchFunction; + /** Configure logging for the client. */ + logging?: core.logging.LogConfig | core.logging.Logger; +} + +export interface BaseRequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | null | undefined>; +} + +export function normalizeClientOptions(options: T): T { + const headers = mergeHeaders( + { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@vapi-ai/server-sdk", + "X-Fern-SDK-Version": "0.10.3", + "User-Agent": "@vapi-ai/server-sdk/0.10.3", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + options?.headers, + ); + + return { + ...options, + logging: core.logging.createLogger(options?.logging), + headers, + } as T; +} diff --git a/src/Client.ts b/src/Client.ts index eda0231a..f366c041 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -1,131 +1,108 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "./environments.js"; -import * as core from "./core/index.js"; -import { mergeHeaders } from "./core/headers.js"; -import { Assistants } from "./api/resources/assistants/client/Client.js"; -import { Squads } from "./api/resources/squads/client/Client.js"; -import { Calls } from "./api/resources/calls/client/Client.js"; -import { Chats } from "./api/resources/chats/client/Client.js"; -import { Campaigns } from "./api/resources/campaigns/client/Client.js"; -import { Sessions } from "./api/resources/sessions/client/Client.js"; -import { PhoneNumbers } from "./api/resources/phoneNumbers/client/Client.js"; -import { Tools } from "./api/resources/tools/client/Client.js"; -import { Files } from "./api/resources/files/client/Client.js"; -import { StructuredOutputs } from "./api/resources/structuredOutputs/client/Client.js"; -import { Eval } from "./api/resources/eval/client/Client.js"; -import { ProviderResources } from "./api/resources/providerResources/client/Client.js"; -import { Analytics } from "./api/resources/analytics/client/Client.js"; +// This file was auto-generated by Fern from our API Definition. + +import { AnalyticsClient } from "./api/resources/analytics/client/Client.js"; +import { AssistantsClient } from "./api/resources/assistants/client/Client.js"; +import { CallsClient } from "./api/resources/calls/client/Client.js"; +import { CampaignsClient } from "./api/resources/campaigns/client/Client.js"; +import { ChatsClient } from "./api/resources/chats/client/Client.js"; +import { EvalClient } from "./api/resources/eval/client/Client.js"; +import { FilesClient } from "./api/resources/files/client/Client.js"; +import { InsightClient } from "./api/resources/insight/client/Client.js"; +import { ObservabilityScorecardClient } from "./api/resources/observabilityScorecard/client/Client.js"; +import { PhoneNumbersClient } from "./api/resources/phoneNumbers/client/Client.js"; +import { ProviderResourcesClient } from "./api/resources/providerResources/client/Client.js"; +import { SessionsClient } from "./api/resources/sessions/client/Client.js"; +import { SquadsClient } from "./api/resources/squads/client/Client.js"; +import { StructuredOutputsClient } from "./api/resources/structuredOutputs/client/Client.js"; +import { ToolsClient } from "./api/resources/tools/client/Client.js"; +import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js"; +import { normalizeClientOptions } from "./BaseClient.js"; export declare namespace VapiClient { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } - - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface Options extends BaseClientOptions {} + + export interface RequestOptions extends BaseRequestOptions {} } export class VapiClient { protected readonly _options: VapiClient.Options; - protected _assistants: Assistants | undefined; - protected _squads: Squads | undefined; - protected _calls: Calls | undefined; - protected _chats: Chats | undefined; - protected _campaigns: Campaigns | undefined; - protected _sessions: Sessions | undefined; - protected _phoneNumbers: PhoneNumbers | undefined; - protected _tools: Tools | undefined; - protected _files: Files | undefined; - protected _structuredOutputs: StructuredOutputs | undefined; - protected _eval: Eval | undefined; - protected _providerResources: ProviderResources | undefined; - protected _analytics: Analytics | undefined; + protected _assistants: AssistantsClient | undefined; + protected _squads: SquadsClient | undefined; + protected _calls: CallsClient | undefined; + protected _chats: ChatsClient | undefined; + protected _campaigns: CampaignsClient | undefined; + protected _sessions: SessionsClient | undefined; + protected _phoneNumbers: PhoneNumbersClient | undefined; + protected _tools: ToolsClient | undefined; + protected _files: FilesClient | undefined; + protected _structuredOutputs: StructuredOutputsClient | undefined; + protected _insight: InsightClient | undefined; + protected _eval: EvalClient | undefined; + protected _observabilityScorecard: ObservabilityScorecardClient | undefined; + protected _providerResources: ProviderResourcesClient | undefined; + protected _analytics: AnalyticsClient | undefined; + + constructor(options: VapiClient.Options) { + this._options = normalizeClientOptions(options); + } + + public get assistants(): AssistantsClient { + return (this._assistants ??= new AssistantsClient(this._options)); + } - constructor(_options: VapiClient.Options) { - this._options = { - ..._options, - headers: mergeHeaders( - { - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "@vapi-ai/server-sdk", - "X-Fern-SDK-Version": "0.10.4", - "User-Agent": "@vapi-ai/server-sdk/0.10.4", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - }, - _options?.headers, - ), - }; + public get squads(): SquadsClient { + return (this._squads ??= new SquadsClient(this._options)); } - public get assistants(): Assistants { - return (this._assistants ??= new Assistants(this._options)); + public get calls(): CallsClient { + return (this._calls ??= new CallsClient(this._options)); } - public get squads(): Squads { - return (this._squads ??= new Squads(this._options)); + public get chats(): ChatsClient { + return (this._chats ??= new ChatsClient(this._options)); } - public get calls(): Calls { - return (this._calls ??= new Calls(this._options)); + public get campaigns(): CampaignsClient { + return (this._campaigns ??= new CampaignsClient(this._options)); } - public get chats(): Chats { - return (this._chats ??= new Chats(this._options)); + public get sessions(): SessionsClient { + return (this._sessions ??= new SessionsClient(this._options)); } - public get campaigns(): Campaigns { - return (this._campaigns ??= new Campaigns(this._options)); + public get phoneNumbers(): PhoneNumbersClient { + return (this._phoneNumbers ??= new PhoneNumbersClient(this._options)); } - public get sessions(): Sessions { - return (this._sessions ??= new Sessions(this._options)); + public get tools(): ToolsClient { + return (this._tools ??= new ToolsClient(this._options)); } - public get phoneNumbers(): PhoneNumbers { - return (this._phoneNumbers ??= new PhoneNumbers(this._options)); + public get files(): FilesClient { + return (this._files ??= new FilesClient(this._options)); } - public get tools(): Tools { - return (this._tools ??= new Tools(this._options)); + public get structuredOutputs(): StructuredOutputsClient { + return (this._structuredOutputs ??= new StructuredOutputsClient(this._options)); } - public get files(): Files { - return (this._files ??= new Files(this._options)); + public get insight(): InsightClient { + return (this._insight ??= new InsightClient(this._options)); } - public get structuredOutputs(): StructuredOutputs { - return (this._structuredOutputs ??= new StructuredOutputs(this._options)); + public get eval(): EvalClient { + return (this._eval ??= new EvalClient(this._options)); } - public get eval(): Eval { - return (this._eval ??= new Eval(this._options)); + public get observabilityScorecard(): ObservabilityScorecardClient { + return (this._observabilityScorecard ??= new ObservabilityScorecardClient(this._options)); } - public get providerResources(): ProviderResources { - return (this._providerResources ??= new ProviderResources(this._options)); + public get providerResources(): ProviderResourcesClient { + return (this._providerResources ??= new ProviderResourcesClient(this._options)); } - public get analytics(): Analytics { - return (this._analytics ??= new Analytics(this._options)); + public get analytics(): AnalyticsClient { + return (this._analytics ??= new AnalyticsClient(this._options)); } } diff --git a/src/api/errors/BadRequestError.ts b/src/api/errors/BadRequestError.ts index b4fc0f41..1d4af8d5 100644 --- a/src/api/errors/BadRequestError.ts +++ b/src/api/errors/BadRequestError.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type * as core from "../../core/index.js"; import * as errors from "../../errors/index.js"; -import * as core from "../../core/index.js"; export class BadRequestError extends errors.VapiError { constructor(body?: unknown, rawResponse?: core.RawResponse) { diff --git a/src/api/errors/NotFoundError.ts b/src/api/errors/NotFoundError.ts index 6fe7a7fd..683dfeb2 100644 --- a/src/api/errors/NotFoundError.ts +++ b/src/api/errors/NotFoundError.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type * as core from "../../core/index.js"; import * as errors from "../../errors/index.js"; -import * as core from "../../core/index.js"; export class NotFoundError extends errors.VapiError { constructor(body?: unknown, rawResponse?: core.RawResponse) { diff --git a/src/api/index.ts b/src/api/index.ts index 72cddbe7..6ed44b0b 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,3 +1,3 @@ +export * from "./errors/index.js"; export * from "./resources/index.js"; export * from "./types/index.js"; -export * from "./errors/index.js"; diff --git a/src/api/resources/analytics/client/Client.ts b/src/api/resources/analytics/client/Client.ts index 64bab232..7b9073b0 100644 --- a/src/api/resources/analytics/client/Client.ts +++ b/src/api/resources/analytics/client/Client.ts @@ -1,48 +1,29 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Analytics { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace AnalyticsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Analytics { - protected readonly _options: Analytics.Options; +export class AnalyticsClient { + protected readonly _options: AnalyticsClient.Options; - constructor(_options: Analytics.Options) { - this._options = _options; + constructor(options: AnalyticsClient.Options) { + this._options = normalizeClientOptions(options); } /** * @param {Vapi.AnalyticsQueryDto} request - * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. + * @param {AnalyticsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.analytics.get({ @@ -58,16 +39,16 @@ export class Analytics { */ public get( request: Vapi.AnalyticsQueryDto, - requestOptions?: Analytics.RequestOptions, + requestOptions?: AnalyticsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } private async __get( request: Vapi.AnalyticsQueryDto, - requestOptions?: Analytics.RequestOptions, + requestOptions?: AnalyticsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -85,9 +66,11 @@ export class Analytics { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.AnalyticsQueryResult[], rawResponse: _response.rawResponse }; diff --git a/src/api/resources/analytics/client/index.ts b/src/api/resources/analytics/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/analytics/client/index.ts +++ b/src/api/resources/analytics/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/analytics/client/requests/AnalyticsQueryDto.ts b/src/api/resources/analytics/client/requests/AnalyticsQueryDto.ts index c78bfbe9..fa75374c 100644 --- a/src/api/resources/analytics/client/requests/AnalyticsQueryDto.ts +++ b/src/api/resources/analytics/client/requests/AnalyticsQueryDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example diff --git a/src/api/resources/analytics/client/requests/index.ts b/src/api/resources/analytics/client/requests/index.ts index ed095966..390628b5 100644 --- a/src/api/resources/analytics/client/requests/index.ts +++ b/src/api/resources/analytics/client/requests/index.ts @@ -1 +1 @@ -export { type AnalyticsQueryDto } from "./AnalyticsQueryDto.js"; +export type { AnalyticsQueryDto } from "./AnalyticsQueryDto.js"; diff --git a/src/api/resources/assistants/client/Client.ts b/src/api/resources/assistants/client/Client.ts index 7b68dac5..3db700d2 100644 --- a/src/api/resources/assistants/client/Client.ts +++ b/src/api/resources/assistants/client/Client.ts @@ -1,72 +1,43 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Assistants { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace AssistantsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Assistants { - protected readonly _options: Assistants.Options; +export class AssistantsClient { + protected readonly _options: AssistantsClient.Options; - constructor(_options: Assistants.Options) { - this._options = _options; + constructor(options: AssistantsClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {Vapi.AssistantsListRequest} request - * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ListAssistantsRequest} request + * @param {AssistantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.assistants.list({ - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.assistants.list() */ public list( - request: Vapi.AssistantsListRequest = {}, - requestOptions?: Assistants.RequestOptions, + request: Vapi.ListAssistantsRequest = {}, + requestOptions?: AssistantsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); } private async __list( - request: Vapi.AssistantsListRequest = {}, - requestOptions?: Assistants.RequestOptions, + request: Vapi.ListAssistantsRequest = {}, + requestOptions?: AssistantsClient.RequestOptions, ): Promise> { const { limit, @@ -80,43 +51,43 @@ export class Assistants { updatedAtLe, } = request; const _queryParams: Record = {}; - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -131,9 +102,11 @@ export class Assistants { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Assistant[], rawResponse: _response.rawResponse }; @@ -166,23 +139,23 @@ export class Assistants { /** * @param {Vapi.CreateAssistantDto} request - * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * @param {AssistantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.assistants.create({}) */ public create( request: Vapi.CreateAssistantDto, - requestOptions?: Assistants.RequestOptions, + requestOptions?: AssistantsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( request: Vapi.CreateAssistantDto, - requestOptions?: Assistants.RequestOptions, + requestOptions?: AssistantsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -200,9 +173,11 @@ export class Assistants { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Assistant, rawResponse: _response.rawResponse }; @@ -234,21 +209,27 @@ export class Assistants { } /** - * @param {string} id - * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.GetAssistantsRequest} request + * @param {AssistantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.assistants.get("id") + * await client.assistants.get({ + * id: "id" + * }) */ - public get(id: string, requestOptions?: Assistants.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + public get( + request: Vapi.GetAssistantsRequest, + requestOptions?: AssistantsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } private async __get( - id: string, - requestOptions?: Assistants.RequestOptions, + request: Vapi.GetAssistantsRequest, + requestOptions?: AssistantsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -258,14 +239,16 @@ export class Assistants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `assistant/${encodeURIComponent(id)}`, + `assistant/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Assistant, rawResponse: _response.rawResponse }; @@ -297,21 +280,27 @@ export class Assistants { } /** - * @param {string} id - * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.DeleteAssistantsRequest} request + * @param {AssistantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.assistants.delete("id") + * await client.assistants.delete({ + * id: "id" + * }) */ - public delete(id: string, requestOptions?: Assistants.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + public delete( + request: Vapi.DeleteAssistantsRequest, + requestOptions?: AssistantsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions)); } private async __delete( - id: string, - requestOptions?: Assistants.RequestOptions, + request: Vapi.DeleteAssistantsRequest, + requestOptions?: AssistantsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -321,14 +310,16 @@ export class Assistants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `assistant/${encodeURIComponent(id)}`, + `assistant/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Assistant, rawResponse: _response.rawResponse }; @@ -360,27 +351,27 @@ export class Assistants { } /** - * @param {string} id * @param {Vapi.UpdateAssistantDto} request - * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * @param {AssistantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.assistants.update("id") + * await client.assistants.update({ + * id: "id" + * }) */ public update( - id: string, - request: Vapi.UpdateAssistantDto = {}, - requestOptions?: Assistants.RequestOptions, + request: Vapi.UpdateAssistantDto, + requestOptions?: AssistantsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); } private async __update( - id: string, - request: Vapi.UpdateAssistantDto = {}, - requestOptions?: Assistants.RequestOptions, + request: Vapi.UpdateAssistantDto, + requestOptions?: AssistantsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -390,17 +381,19 @@ export class Assistants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `assistant/${encodeURIComponent(id)}`, + `assistant/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Assistant, rawResponse: _response.rawResponse }; diff --git a/src/api/resources/assistants/client/index.ts b/src/api/resources/assistants/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/assistants/client/index.ts +++ b/src/api/resources/assistants/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/assistants/client/requests/DeleteAssistantsRequest.ts b/src/api/resources/assistants/client/requests/DeleteAssistantsRequest.ts new file mode 100644 index 00000000..276830fe --- /dev/null +++ b/src/api/resources/assistants/client/requests/DeleteAssistantsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface DeleteAssistantsRequest { + id: string; +} diff --git a/src/api/resources/assistants/client/requests/GetAssistantsRequest.ts b/src/api/resources/assistants/client/requests/GetAssistantsRequest.ts new file mode 100644 index 00000000..e1f6a364 --- /dev/null +++ b/src/api/resources/assistants/client/requests/GetAssistantsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface GetAssistantsRequest { + id: string; +} diff --git a/src/api/resources/tools/client/requests/ToolsListRequest.ts b/src/api/resources/assistants/client/requests/ListAssistantsRequest.ts similarity index 51% rename from src/api/resources/tools/client/requests/ToolsListRequest.ts rename to src/api/resources/assistants/client/requests/ListAssistantsRequest.ts index eb134df7..55232b3c 100644 --- a/src/api/resources/tools/client/requests/ToolsListRequest.ts +++ b/src/api/resources/assistants/client/requests/ListAssistantsRequest.ts @@ -1,38 +1,26 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * @example - * { - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ -export interface ToolsListRequest { +export interface ListAssistantsRequest { /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/assistants/client/requests/UpdateAssistantDto.ts b/src/api/resources/assistants/client/requests/UpdateAssistantDto.ts index 2f7cb373..d0252072 100644 --- a/src/api/resources/assistants/client/requests/UpdateAssistantDto.ts +++ b/src/api/resources/assistants/client/requests/UpdateAssistantDto.ts @@ -1,14 +1,15 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * {} + * { + * id: "id" + * } */ export interface UpdateAssistantDto { + id: string; /** These are the options for the assistant's transcriber. */ transcriber?: Vapi.UpdateAssistantDtoTranscriber; /** These are the options for the assistant's LLM. */ @@ -35,13 +36,12 @@ export interface UpdateAssistantDto { firstMessageMode?: Vapi.UpdateAssistantDtoFirstMessageMode; /** * 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. + * By default, voicemail detection is disabled. */ voicemailDetection?: Vapi.UpdateAssistantDtoVoicemailDetection; - /** 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. 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. */ clientMessages?: Vapi.UpdateAssistantDtoClientMessagesItem[]; - /** 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. You can check the shape of the messages in ServerMessage schema. */ + /** 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. */ serverMessages?: Vapi.UpdateAssistantDtoServerMessagesItem[]; /** * This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. diff --git a/src/api/resources/assistants/client/requests/index.ts b/src/api/resources/assistants/client/requests/index.ts index 0bee90af..17898b95 100644 --- a/src/api/resources/assistants/client/requests/index.ts +++ b/src/api/resources/assistants/client/requests/index.ts @@ -1,2 +1,4 @@ -export { type AssistantsListRequest } from "./AssistantsListRequest.js"; -export { type UpdateAssistantDto } from "./UpdateAssistantDto.js"; +export type { DeleteAssistantsRequest } from "./DeleteAssistantsRequest.js"; +export type { GetAssistantsRequest } from "./GetAssistantsRequest.js"; +export type { ListAssistantsRequest } from "./ListAssistantsRequest.js"; +export type { UpdateAssistantDto } from "./UpdateAssistantDto.js"; diff --git a/src/api/resources/assistants/index.ts b/src/api/resources/assistants/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/assistants/index.ts +++ b/src/api/resources/assistants/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoBackgroundSound.ts b/src/api/resources/assistants/types/UpdateAssistantDtoBackgroundSound.ts index ab21a2ff..9aea8ab2 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoBackgroundSound.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoBackgroundSound.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoBackgroundSoundZero.ts b/src/api/resources/assistants/types/UpdateAssistantDtoBackgroundSoundZero.ts index 07c4e26c..fd216fa7 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoBackgroundSoundZero.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoBackgroundSoundZero.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateAssistantDtoBackgroundSoundZero = "off" | "office"; export const UpdateAssistantDtoBackgroundSoundZero = { Off: "off", Office: "office", } as const; +export type UpdateAssistantDtoBackgroundSoundZero = + (typeof UpdateAssistantDtoBackgroundSoundZero)[keyof typeof UpdateAssistantDtoBackgroundSoundZero]; diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoClientMessagesItem.ts b/src/api/resources/assistants/types/UpdateAssistantDtoClientMessagesItem.ts index 2dafca2e..e21df329 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoClientMessagesItem.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoClientMessagesItem.ts @@ -1,25 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateAssistantDtoClientMessagesItem = - | "conversation-update" - | "function-call" - | "function-call-result" - | "hang" - | "language-changed" - | "metadata" - | "model-output" - | "speech-update" - | "status-update" - | "transcript" - | "tool-calls" - | "tool-calls-result" - | "tool.completed" - | "transfer-update" - | "user-interrupted" - | "voice-input" - | "workflow.node.started"; export const UpdateAssistantDtoClientMessagesItem = { ConversationUpdate: "conversation-update", FunctionCall: "function-call", @@ -38,4 +18,7 @@ export const UpdateAssistantDtoClientMessagesItem = { UserInterrupted: "user-interrupted", VoiceInput: "voice-input", WorkflowNodeStarted: "workflow.node.started", + AssistantStarted: "assistant.started", } as const; +export type UpdateAssistantDtoClientMessagesItem = + (typeof UpdateAssistantDtoClientMessagesItem)[keyof typeof UpdateAssistantDtoClientMessagesItem]; diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoCredentialsItem.ts b/src/api/resources/assistants/types/UpdateAssistantDtoCredentialsItem.ts index 8967fc33..d0a94e18 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoCredentialsItem.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoCredentialsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; export type UpdateAssistantDtoCredentialsItem = | Vapi.CreateElevenLabsCredentialDto diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoFirstMessageMode.ts b/src/api/resources/assistants/types/UpdateAssistantDtoFirstMessageMode.ts index 72dc2e18..4d12063f 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoFirstMessageMode.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoFirstMessageMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the mode for the first message. Default is 'assistant-speaks-first'. @@ -12,12 +10,10 @@ * * @default 'assistant-speaks-first' */ -export type UpdateAssistantDtoFirstMessageMode = - | "assistant-speaks-first" - | "assistant-speaks-first-with-model-generated-message" - | "assistant-waits-for-user"; export const UpdateAssistantDtoFirstMessageMode = { AssistantSpeaksFirst: "assistant-speaks-first", AssistantSpeaksFirstWithModelGeneratedMessage: "assistant-speaks-first-with-model-generated-message", AssistantWaitsForUser: "assistant-waits-for-user", } as const; +export type UpdateAssistantDtoFirstMessageMode = + (typeof UpdateAssistantDtoFirstMessageMode)[keyof typeof UpdateAssistantDtoFirstMessageMode]; diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoHooksItem.ts b/src/api/resources/assistants/types/UpdateAssistantDtoHooksItem.ts index 549ff105..b32d9a9c 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoHooksItem.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoHooksItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; export type UpdateAssistantDtoHooksItem = | Vapi.CallHookCallEnding diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoModel.ts b/src/api/resources/assistants/types/UpdateAssistantDtoModel.ts index 150161d4..1a032202 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoModel.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * These are the options for the assistant's LLM. diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoServerMessagesItem.ts b/src/api/resources/assistants/types/UpdateAssistantDtoServerMessagesItem.ts index d9f24fa2..719ddd75 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoServerMessagesItem.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoServerMessagesItem.ts @@ -1,34 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateAssistantDtoServerMessagesItem = - | "conversation-update" - | "end-of-call-report" - | "function-call" - | "hang" - | "language-changed" - | "language-change-detected" - | "model-output" - | "phone-call-control" - | "speech-update" - | "status-update" - | "transcript" - | 'transcript[transcriptType="final"]' - | "tool-calls" - | "transfer-destination-request" - | "handoff-destination-request" - | "transfer-update" - | "user-interrupted" - | "voice-input" - | "chat.created" - | "chat.deleted" - | "session.created" - | "session.updated" - | "session.deleted" - | "call.deleted" - | "call.delete.failed"; export const UpdateAssistantDtoServerMessagesItem = { + AssistantStarted: "assistant.started", ConversationUpdate: "conversation-update", EndOfCallReport: "end-of-call-report", FunctionCall: "function-call", @@ -55,3 +28,5 @@ export const UpdateAssistantDtoServerMessagesItem = { CallDeleted: "call.deleted", CallDeleteFailed: "call.delete.failed", } as const; +export type UpdateAssistantDtoServerMessagesItem = + (typeof UpdateAssistantDtoServerMessagesItem)[keyof typeof UpdateAssistantDtoServerMessagesItem]; diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoTranscriber.ts b/src/api/resources/assistants/types/UpdateAssistantDtoTranscriber.ts index b3d47ad6..04d0bc7c 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoTranscriber.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * These are the options for the assistant's transcriber. diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoVoice.ts b/src/api/resources/assistants/types/UpdateAssistantDtoVoice.ts index a602f955..d6899d9e 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoVoice.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * These are the options for the assistant's voice. diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoVoicemailDetection.ts b/src/api/resources/assistants/types/UpdateAssistantDtoVoicemailDetection.ts index 2ef0920f..f3a00f17 100644 --- a/src/api/resources/assistants/types/UpdateAssistantDtoVoicemailDetection.ts +++ b/src/api/resources/assistants/types/UpdateAssistantDtoVoicemailDetection.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * 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. + * By default, voicemail detection is disabled. */ export type UpdateAssistantDtoVoicemailDetection = + | Vapi.UpdateAssistantDtoVoicemailDetectionZero | Vapi.GoogleVoicemailDetectionPlan | Vapi.OpenAiVoicemailDetectionPlan | Vapi.TwilioVoicemailDetectionPlan diff --git a/src/api/resources/assistants/types/UpdateAssistantDtoVoicemailDetectionZero.ts b/src/api/resources/assistants/types/UpdateAssistantDtoVoicemailDetectionZero.ts new file mode 100644 index 00000000..9a5baf48 --- /dev/null +++ b/src/api/resources/assistants/types/UpdateAssistantDtoVoicemailDetectionZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const UpdateAssistantDtoVoicemailDetectionZero = { + Off: "off", +} as const; +export type UpdateAssistantDtoVoicemailDetectionZero = + (typeof UpdateAssistantDtoVoicemailDetectionZero)[keyof typeof UpdateAssistantDtoVoicemailDetectionZero]; diff --git a/src/api/resources/assistants/types/index.ts b/src/api/resources/assistants/types/index.ts index bd103f41..560d2008 100644 --- a/src/api/resources/assistants/types/index.ts +++ b/src/api/resources/assistants/types/index.ts @@ -1,11 +1,12 @@ -export * from "./UpdateAssistantDtoTranscriber.js"; -export * from "./UpdateAssistantDtoModel.js"; -export * from "./UpdateAssistantDtoVoice.js"; -export * from "./UpdateAssistantDtoFirstMessageMode.js"; -export * from "./UpdateAssistantDtoVoicemailDetection.js"; -export * from "./UpdateAssistantDtoClientMessagesItem.js"; -export * from "./UpdateAssistantDtoServerMessagesItem.js"; -export * from "./UpdateAssistantDtoBackgroundSoundZero.js"; export * from "./UpdateAssistantDtoBackgroundSound.js"; +export * from "./UpdateAssistantDtoBackgroundSoundZero.js"; +export * from "./UpdateAssistantDtoClientMessagesItem.js"; export * from "./UpdateAssistantDtoCredentialsItem.js"; +export * from "./UpdateAssistantDtoFirstMessageMode.js"; export * from "./UpdateAssistantDtoHooksItem.js"; +export * from "./UpdateAssistantDtoModel.js"; +export * from "./UpdateAssistantDtoServerMessagesItem.js"; +export * from "./UpdateAssistantDtoTranscriber.js"; +export * from "./UpdateAssistantDtoVoice.js"; +export * from "./UpdateAssistantDtoVoicemailDetection.js"; +export * from "./UpdateAssistantDtoVoicemailDetectionZero.js"; diff --git a/src/api/resources/calls/client/Client.ts b/src/api/resources/calls/client/Client.ts index ee6591d1..a4371858 100644 --- a/src/api/resources/calls/client/Client.ts +++ b/src/api/resources/calls/client/Client.ts @@ -1,76 +1,44 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; -import * as errors from "../../../../errors/index.js"; +import * as core from "../../../../core/index.js"; import { toJson } from "../../../../core/json.js"; +import * as environments from "../../../../environments.js"; +import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Calls { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace CallsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Calls { - protected readonly _options: Calls.Options; +export class CallsClient { + protected readonly _options: CallsClient.Options; - constructor(_options: Calls.Options) { - this._options = _options; + constructor(options: CallsClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {Vapi.CallsListRequest} request - * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ListCallsRequest} request + * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.calls.list({ - * id: "id", - * assistantId: "assistantId", - * phoneNumberId: "phoneNumberId", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.calls.list() */ public list( - request: Vapi.CallsListRequest = {}, - requestOptions?: Calls.RequestOptions, + request: Vapi.ListCallsRequest = {}, + requestOptions?: CallsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); } private async __list( - request: Vapi.CallsListRequest = {}, - requestOptions?: Calls.RequestOptions, + request: Vapi.ListCallsRequest = {}, + requestOptions?: CallsClient.RequestOptions, ): Promise> { const { id, @@ -87,55 +55,55 @@ export class Calls { updatedAtLe, } = request; const _queryParams: Record = {}; - if (id !== undefined) { - _queryParams["id"] = id; + if (id != null) { + _queryParams.id = id; } - if (assistantId !== undefined) { - _queryParams["assistantId"] = assistantId; + if (assistantId != null) { + _queryParams.assistantId = assistantId; } - if (phoneNumberId !== undefined) { - _queryParams["phoneNumberId"] = phoneNumberId; + if (phoneNumberId != null) { + _queryParams.phoneNumberId = phoneNumberId; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -150,9 +118,11 @@ export class Calls { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Call[], rawResponse: _response.rawResponse }; @@ -185,23 +155,23 @@ export class Calls { /** * @param {Vapi.CreateCallDto} request - * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.calls.create() */ public create( request: Vapi.CreateCallDto = {}, - requestOptions?: Calls.RequestOptions, - ): core.HttpResponsePromise { + requestOptions?: CallsClient.RequestOptions, + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( request: Vapi.CreateCallDto = {}, - requestOptions?: Calls.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + requestOptions?: CallsClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -219,12 +189,14 @@ export class Calls { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.CallsCreateResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.CreateCallsResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -254,48 +226,29 @@ export class Calls { /** * @param {Vapi.CallControllerFindAllPaginatedRequest} request - * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.calls.callControllerFindAllPaginated({ - * assistantId: "assistantId", - * assistantName: "assistantName", - * id: "id", - * costLe: 1.1, - * costGe: 1.1, - * cost: 1.1, - * successEvaluation: "successEvaluation", - * endedReason: "endedReason", - * phoneNumberId: "phoneNumberId", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.calls.callControllerFindAllPaginated() */ public callControllerFindAllPaginated( request: Vapi.CallControllerFindAllPaginatedRequest = {}, - requestOptions?: Calls.RequestOptions, + requestOptions?: CallsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__callControllerFindAllPaginated(request, requestOptions)); } private async __callControllerFindAllPaginated( request: Vapi.CallControllerFindAllPaginatedRequest = {}, - requestOptions?: Calls.RequestOptions, + requestOptions?: CallsClient.RequestOptions, ): Promise> { const { assistantOverrides, customer, assistantId, assistantName, + squadId, + squadName, id, idAny, costLe, @@ -305,6 +258,7 @@ export class Calls { endedReason, phoneNumberId, structuredOutputs, + score, page, sortOrder, limit, @@ -318,107 +272,119 @@ export class Calls { updatedAtLe, } = request; const _queryParams: Record = {}; - if (assistantOverrides !== undefined) { - _queryParams["assistantOverrides"] = toJson(assistantOverrides); + if (assistantOverrides != null) { + _queryParams.assistantOverrides = toJson(assistantOverrides); + } + + if (customer != null) { + _queryParams.customer = toJson(customer); } - if (customer !== undefined) { - _queryParams["customer"] = toJson(customer); + if (assistantId != null) { + _queryParams.assistantId = assistantId; } - if (assistantId !== undefined) { - _queryParams["assistantId"] = assistantId; + if (assistantName != null) { + _queryParams.assistantName = assistantName; } - if (assistantName !== undefined) { - _queryParams["assistantName"] = assistantName; + if (squadId != null) { + _queryParams.squadId = squadId; } - if (id !== undefined) { - _queryParams["id"] = id; + if (squadName != null) { + _queryParams.squadName = squadName; } - if (idAny !== undefined) { + if (id != null) { + _queryParams.id = id; + } + + if (idAny != null) { if (Array.isArray(idAny)) { - _queryParams["idAny"] = idAny.map((item) => item); + _queryParams.idAny = idAny.map((item) => item); } else { - _queryParams["idAny"] = idAny; + _queryParams.idAny = idAny; } } - if (costLe !== undefined) { - _queryParams["costLe"] = costLe?.toString() ?? null; + if (costLe != null) { + _queryParams.costLe = costLe.toString(); + } + + if (costGe != null) { + _queryParams.costGe = costGe.toString(); } - if (costGe !== undefined) { - _queryParams["costGe"] = costGe?.toString() ?? null; + if (cost != null) { + _queryParams.cost = cost.toString(); } - if (cost !== undefined) { - _queryParams["cost"] = cost?.toString() ?? null; + if (successEvaluation != null) { + _queryParams.successEvaluation = successEvaluation; } - if (successEvaluation !== undefined) { - _queryParams["successEvaluation"] = successEvaluation; + if (endedReason != null) { + _queryParams.endedReason = endedReason; } - if (endedReason !== undefined) { - _queryParams["endedReason"] = endedReason; + if (phoneNumberId != null) { + _queryParams.phoneNumberId = phoneNumberId; } - if (phoneNumberId !== undefined) { - _queryParams["phoneNumberId"] = phoneNumberId; + if (structuredOutputs != null) { + _queryParams.structuredOutputs = toJson(structuredOutputs); } - if (structuredOutputs !== undefined) { - _queryParams["structuredOutputs"] = toJson(structuredOutputs); + if (score != null) { + _queryParams.score = score; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (page != null) { + _queryParams.page = page.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -433,9 +399,11 @@ export class Calls { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.CallPaginatedResponse, rawResponse: _response.rawResponse }; @@ -467,18 +435,27 @@ export class Calls { } /** - * @param {string} id - * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.GetCallsRequest} request + * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.calls.get("id") + * await client.calls.get({ + * id: "id" + * }) */ - public get(id: string, requestOptions?: Calls.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + public get( + request: Vapi.GetCallsRequest, + requestOptions?: CallsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } - private async __get(id: string, requestOptions?: Calls.RequestOptions): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + private async __get( + request: Vapi.GetCallsRequest, + requestOptions?: CallsClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -488,14 +465,16 @@ export class Calls { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `call/${encodeURIComponent(id)}`, + `call/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Call, rawResponse: _response.rawResponse }; @@ -527,27 +506,27 @@ export class Calls { } /** - * @param {string} id * @param {Vapi.DeleteCallDto} request - * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.calls.delete("id") + * await client.calls.delete({ + * id: "id" + * }) */ public delete( - id: string, - request: Vapi.DeleteCallDto = {}, - requestOptions?: Calls.RequestOptions, + request: Vapi.DeleteCallDto, + requestOptions?: CallsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__delete(id, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions)); } private async __delete( - id: string, - request: Vapi.DeleteCallDto = {}, - requestOptions?: Calls.RequestOptions, + request: Vapi.DeleteCallDto, + requestOptions?: CallsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -557,17 +536,19 @@ export class Calls { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `call/${encodeURIComponent(id)}`, + `call/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Call, rawResponse: _response.rawResponse }; @@ -599,27 +580,27 @@ export class Calls { } /** - * @param {string} id * @param {Vapi.UpdateCallDto} request - * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.calls.update("id") + * await client.calls.update({ + * id: "id" + * }) */ public update( - id: string, - request: Vapi.UpdateCallDto = {}, - requestOptions?: Calls.RequestOptions, + request: Vapi.UpdateCallDto, + requestOptions?: CallsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); } private async __update( - id: string, - request: Vapi.UpdateCallDto = {}, - requestOptions?: Calls.RequestOptions, + request: Vapi.UpdateCallDto, + requestOptions?: CallsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -629,17 +610,19 @@ export class Calls { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `call/${encodeURIComponent(id)}`, + `call/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Call, rawResponse: _response.rawResponse }; diff --git a/src/api/resources/calls/client/index.ts b/src/api/resources/calls/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/calls/client/index.ts +++ b/src/api/resources/calls/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/calls/client/requests/CallControllerFindAllPaginatedRequest.ts b/src/api/resources/calls/client/requests/CallControllerFindAllPaginatedRequest.ts index 92875fc0..59613fed 100644 --- a/src/api/resources/calls/client/requests/CallControllerFindAllPaginatedRequest.ts +++ b/src/api/resources/calls/client/requests/CallControllerFindAllPaginatedRequest.ts @@ -1,84 +1,64 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * { - * assistantId: "assistantId", - * assistantName: "assistantName", - * id: "id", - * costLe: 1.1, - * costGe: 1.1, - * cost: 1.1, - * successEvaluation: "successEvaluation", - * endedReason: "endedReason", - * phoneNumberId: "phoneNumberId", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ export interface CallControllerFindAllPaginatedRequest { /** Filter by assistant overrides. Use variableValues to filter by template variables. */ - assistantOverrides?: Record | null; + assistantOverrides?: Record; /** Filter by customer properties. Supports filtering by number, name, externalId, and extension. */ - customer?: Record | null; + customer?: Record; /** This will return calls with the specified assistantId. */ - assistantId?: string | null; + assistantId?: string; /** This will return calls where the transient assistant name exactly matches the specified value (case-insensitive). */ - assistantName?: string | null; + assistantName?: string; + /** This will return calls with the specified squadId. */ + squadId?: string; + /** This will return calls where the transient squad name exactly matches the specified value (case-insensitive). */ + squadName?: string; /** This will return calls with the specified callId. */ - id?: string | null; + id?: string; /** This will return calls with the specified callIds. */ - idAny?: (string | null) | (string | null)[]; + idAny?: string | string[]; /** This will return calls where the cost is less than or equal to the specified value. */ - costLe?: number | null; + costLe?: number; /** This will return calls where the cost is greater than or equal to the specified value. */ - costGe?: number | null; + costGe?: number; /** This will return calls with the exact specified cost. */ - cost?: number | null; + cost?: number; /** This will return calls with the specified successEvaluation. */ - successEvaluation?: string | null; + successEvaluation?: string; /** This will return calls with the specified endedReason. */ - endedReason?: string | null; + endedReason?: string; /** This will return calls with the specified phoneNumberId. */ - phoneNumberId?: string | null; + phoneNumberId?: string; /** Filter calls by structured output values. Use structured output ID as key and filter operators as values. */ - structuredOutputs?: Record< - string, - (Vapi.CallControllerFindAllPaginatedRequestStructuredOutputsValue | null) | undefined - > | null; + structuredOutputs?: Record; + /** Filter calls by the first scorecard's normalized score. */ + score?: string; /** This is the page number to return. Defaults to 1. */ - page?: number | null; + page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.CallControllerFindAllPaginatedRequestSortOrder | null; + sortOrder?: Vapi.CallControllerFindAllPaginatedRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/calls/client/requests/CreateCallDto.ts b/src/api/resources/calls/client/requests/CreateCallDto.ts index 42601644..46439628 100644 --- a/src/api/resources/calls/client/requests/CreateCallDto.ts +++ b/src/api/resources/calls/client/requests/CreateCallDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example @@ -59,6 +57,11 @@ export interface CreateCallDto { * - Workflow, use `workflow` or `workflowId` */ squad?: Vapi.CreateSquadDto; + /** + * These are the overrides for the `squad` or `squadId`'s member settings and template variables. + * This will apply to all members of the squad. + */ + squadOverrides?: Vapi.AssistantOverrides; /** * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. * diff --git a/src/api/resources/calls/client/requests/DeleteCallDto.ts b/src/api/resources/calls/client/requests/DeleteCallDto.ts index 4835c97e..5cb76d49 100644 --- a/src/api/resources/calls/client/requests/DeleteCallDto.ts +++ b/src/api/resources/calls/client/requests/DeleteCallDto.ts @@ -1,12 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * @example - * {} + * { + * id: "id" + * } */ export interface DeleteCallDto { + id: string; /** * These are the Call IDs to be bulk deleted. * If provided, the call ID if any in the request query will be ignored diff --git a/src/api/resources/calls/client/requests/GetCallsRequest.ts b/src/api/resources/calls/client/requests/GetCallsRequest.ts new file mode 100644 index 00000000..50edfeaa --- /dev/null +++ b/src/api/resources/calls/client/requests/GetCallsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface GetCallsRequest { + id: string; +} diff --git a/src/api/resources/calls/client/requests/CallsListRequest.ts b/src/api/resources/calls/client/requests/ListCallsRequest.ts similarity index 54% rename from src/api/resources/calls/client/requests/CallsListRequest.ts rename to src/api/resources/calls/client/requests/ListCallsRequest.ts index 092e2863..862bafde 100644 --- a/src/api/resources/calls/client/requests/CallsListRequest.ts +++ b/src/api/resources/calls/client/requests/ListCallsRequest.ts @@ -1,51 +1,36 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * @example - * { - * id: "id", - * assistantId: "assistantId", - * phoneNumberId: "phoneNumberId", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ -export interface CallsListRequest { +export interface ListCallsRequest { /** This is the unique identifier for the call. */ - id?: string | null; + id?: string; /** This will return calls with the specified assistantId. */ - assistantId?: string | null; + assistantId?: string; /** * 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. */ - phoneNumberId?: string | null; + phoneNumberId?: string; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/calls/client/requests/UpdateCallDto.ts b/src/api/resources/calls/client/requests/UpdateCallDto.ts index b30a3b30..781fdeb6 100644 --- a/src/api/resources/calls/client/requests/UpdateCallDto.ts +++ b/src/api/resources/calls/client/requests/UpdateCallDto.ts @@ -1,12 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * @example - * {} + * { + * id: "id" + * } */ export interface UpdateCallDto { + id: string; /** This is the name of the call. This is just for your own reference. */ name?: string; } diff --git a/src/api/resources/calls/client/requests/index.ts b/src/api/resources/calls/client/requests/index.ts index 5bba1b6e..0ea02d11 100644 --- a/src/api/resources/calls/client/requests/index.ts +++ b/src/api/resources/calls/client/requests/index.ts @@ -1,5 +1,6 @@ -export { type CallsListRequest } from "./CallsListRequest.js"; -export { type CreateCallDto } from "./CreateCallDto.js"; -export { type CallControllerFindAllPaginatedRequest } from "./CallControllerFindAllPaginatedRequest.js"; -export { type DeleteCallDto } from "./DeleteCallDto.js"; -export { type UpdateCallDto } from "./UpdateCallDto.js"; +export type { CallControllerFindAllPaginatedRequest } from "./CallControllerFindAllPaginatedRequest.js"; +export type { CreateCallDto } from "./CreateCallDto.js"; +export type { DeleteCallDto } from "./DeleteCallDto.js"; +export type { GetCallsRequest } from "./GetCallsRequest.js"; +export type { ListCallsRequest } from "./ListCallsRequest.js"; +export type { UpdateCallDto } from "./UpdateCallDto.js"; diff --git a/src/api/resources/calls/index.ts b/src/api/resources/calls/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/calls/index.ts +++ b/src/api/resources/calls/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/calls/types/CallControllerFindAllPaginatedRequestSortOrder.ts b/src/api/resources/calls/types/CallControllerFindAllPaginatedRequestSortOrder.ts index c3b52198..5d90b896 100644 --- a/src/api/resources/calls/types/CallControllerFindAllPaginatedRequestSortOrder.ts +++ b/src/api/resources/calls/types/CallControllerFindAllPaginatedRequestSortOrder.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CallControllerFindAllPaginatedRequestSortOrder = "ASC" | "DESC"; export const CallControllerFindAllPaginatedRequestSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type CallControllerFindAllPaginatedRequestSortOrder = + (typeof CallControllerFindAllPaginatedRequestSortOrder)[keyof typeof CallControllerFindAllPaginatedRequestSortOrder]; diff --git a/src/api/resources/calls/types/CallsCreateResponse.ts b/src/api/resources/calls/types/CallsCreateResponse.ts deleted file mode 100644 index 3dec2022..00000000 --- a/src/api/resources/calls/types/CallsCreateResponse.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type CallsCreateResponse = Vapi.Call | Vapi.CallBatchResponse; diff --git a/src/api/resources/calls/types/CreateCallsResponse.ts b/src/api/resources/calls/types/CreateCallsResponse.ts new file mode 100644 index 00000000..8e86bc9d --- /dev/null +++ b/src/api/resources/calls/types/CreateCallsResponse.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type CreateCallsResponse = Vapi.Call | Vapi.CallBatchResponse; diff --git a/src/api/resources/calls/types/index.ts b/src/api/resources/calls/types/index.ts index cbd3c93c..0eb7b419 100644 --- a/src/api/resources/calls/types/index.ts +++ b/src/api/resources/calls/types/index.ts @@ -1,3 +1,2 @@ -export * from "./CallsCreateResponse.js"; -export * from "./CallControllerFindAllPaginatedRequestStructuredOutputsValue.js"; export * from "./CallControllerFindAllPaginatedRequestSortOrder.js"; +export * from "./CreateCallsResponse.js"; diff --git a/src/api/resources/campaigns/client/Client.ts b/src/api/resources/campaigns/client/Client.ts index e9c44870..3f8acca7 100644 --- a/src/api/resources/campaigns/client/Client.ts +++ b/src/api/resources/campaigns/client/Client.ts @@ -1,76 +1,43 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Campaigns { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace CampaignsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Campaigns { - protected readonly _options: Campaigns.Options; +export class CampaignsClient { + protected readonly _options: CampaignsClient.Options; - constructor(_options: Campaigns.Options) { - this._options = _options; + constructor(options: CampaignsClient.Options) { + this._options = normalizeClientOptions(options); } /** * @param {Vapi.CampaignControllerFindAllRequest} request - * @param {Campaigns.RequestOptions} requestOptions - Request-specific configuration. + * @param {CampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.campaigns.campaignControllerFindAll({ - * id: "id", - * status: "scheduled", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.campaigns.campaignControllerFindAll() */ public campaignControllerFindAll( request: Vapi.CampaignControllerFindAllRequest = {}, - requestOptions?: Campaigns.RequestOptions, + requestOptions?: CampaignsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__campaignControllerFindAll(request, requestOptions)); } private async __campaignControllerFindAll( request: Vapi.CampaignControllerFindAllRequest = {}, - requestOptions?: Campaigns.RequestOptions, + requestOptions?: CampaignsClient.RequestOptions, ): Promise> { const { id, @@ -88,59 +55,59 @@ export class Campaigns { updatedAtLe, } = request; const _queryParams: Record = {}; - if (id !== undefined) { - _queryParams["id"] = id; + if (id != null) { + _queryParams.id = id; } - if (status !== undefined) { - _queryParams["status"] = status; + if (status != null) { + _queryParams.status = status; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (page != null) { + _queryParams.page = page.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -155,9 +122,11 @@ export class Campaigns { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.CampaignPaginatedResponse, rawResponse: _response.rawResponse }; @@ -190,7 +159,7 @@ export class Campaigns { /** * @param {Vapi.CreateCampaignDto} request - * @param {Campaigns.RequestOptions} requestOptions - Request-specific configuration. + * @param {CampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.campaigns.campaignControllerCreate({ @@ -201,16 +170,16 @@ export class Campaigns { */ public campaignControllerCreate( request: Vapi.CreateCampaignDto, - requestOptions?: Campaigns.RequestOptions, + requestOptions?: CampaignsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__campaignControllerCreate(request, requestOptions)); } private async __campaignControllerCreate( request: Vapi.CreateCampaignDto, - requestOptions?: Campaigns.RequestOptions, + requestOptions?: CampaignsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -228,9 +197,11 @@ export class Campaigns { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Campaign, rawResponse: _response.rawResponse }; @@ -262,24 +233,27 @@ export class Campaigns { } /** - * @param {string} id - * @param {Campaigns.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.CampaignControllerFindOneRequest} request + * @param {CampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.campaigns.campaignControllerFindOne("id") + * await client.campaigns.campaignControllerFindOne({ + * id: "id" + * }) */ public campaignControllerFindOne( - id: string, - requestOptions?: Campaigns.RequestOptions, + request: Vapi.CampaignControllerFindOneRequest, + requestOptions?: CampaignsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__campaignControllerFindOne(id, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__campaignControllerFindOne(request, requestOptions)); } private async __campaignControllerFindOne( - id: string, - requestOptions?: Campaigns.RequestOptions, + request: Vapi.CampaignControllerFindOneRequest, + requestOptions?: CampaignsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -289,14 +263,16 @@ export class Campaigns { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `campaign/${encodeURIComponent(id)}`, + `campaign/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Campaign, rawResponse: _response.rawResponse }; @@ -328,24 +304,27 @@ export class Campaigns { } /** - * @param {string} id - * @param {Campaigns.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.CampaignControllerRemoveRequest} request + * @param {CampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.campaigns.campaignControllerRemove("id") + * await client.campaigns.campaignControllerRemove({ + * id: "id" + * }) */ public campaignControllerRemove( - id: string, - requestOptions?: Campaigns.RequestOptions, + request: Vapi.CampaignControllerRemoveRequest, + requestOptions?: CampaignsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__campaignControllerRemove(id, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__campaignControllerRemove(request, requestOptions)); } private async __campaignControllerRemove( - id: string, - requestOptions?: Campaigns.RequestOptions, + request: Vapi.CampaignControllerRemoveRequest, + requestOptions?: CampaignsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -355,14 +334,16 @@ export class Campaigns { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `campaign/${encodeURIComponent(id)}`, + `campaign/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Campaign, rawResponse: _response.rawResponse }; @@ -394,27 +375,27 @@ export class Campaigns { } /** - * @param {string} id * @param {Vapi.UpdateCampaignDto} request - * @param {Campaigns.RequestOptions} requestOptions - Request-specific configuration. + * @param {CampaignsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.campaigns.campaignControllerUpdate("id") + * await client.campaigns.campaignControllerUpdate({ + * id: "id" + * }) */ public campaignControllerUpdate( - id: string, - request: Vapi.UpdateCampaignDto = {}, - requestOptions?: Campaigns.RequestOptions, + request: Vapi.UpdateCampaignDto, + requestOptions?: CampaignsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__campaignControllerUpdate(id, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__campaignControllerUpdate(request, requestOptions)); } private async __campaignControllerUpdate( - id: string, - request: Vapi.UpdateCampaignDto = {}, - requestOptions?: Campaigns.RequestOptions, + request: Vapi.UpdateCampaignDto, + requestOptions?: CampaignsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -424,17 +405,19 @@ export class Campaigns { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `campaign/${encodeURIComponent(id)}`, + `campaign/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Campaign, rawResponse: _response.rawResponse }; diff --git a/src/api/resources/campaigns/client/index.ts b/src/api/resources/campaigns/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/campaigns/client/index.ts +++ b/src/api/resources/campaigns/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/campaigns/client/requests/CampaignControllerFindAllRequest.ts b/src/api/resources/campaigns/client/requests/CampaignControllerFindAllRequest.ts index e0f5762a..6e3b2acc 100644 --- a/src/api/resources/campaigns/client/requests/CampaignControllerFindAllRequest.ts +++ b/src/api/resources/campaigns/client/requests/CampaignControllerFindAllRequest.ts @@ -1,50 +1,34 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * { - * id: "id", - * status: "scheduled", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ export interface CampaignControllerFindAllRequest { - id?: string | null; - status?: Vapi.CampaignControllerFindAllRequestStatus | null; + id?: string; + status?: Vapi.CampaignControllerFindAllRequestStatus; /** This is the page number to return. Defaults to 1. */ - page?: number | null; + page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.CampaignControllerFindAllRequestSortOrder | null; + sortOrder?: Vapi.CampaignControllerFindAllRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/campaigns/client/requests/CampaignControllerFindOneRequest.ts b/src/api/resources/campaigns/client/requests/CampaignControllerFindOneRequest.ts new file mode 100644 index 00000000..61d39f4c --- /dev/null +++ b/src/api/resources/campaigns/client/requests/CampaignControllerFindOneRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface CampaignControllerFindOneRequest { + id: string; +} diff --git a/src/api/resources/campaigns/client/requests/CampaignControllerRemoveRequest.ts b/src/api/resources/campaigns/client/requests/CampaignControllerRemoveRequest.ts new file mode 100644 index 00000000..501468ec --- /dev/null +++ b/src/api/resources/campaigns/client/requests/CampaignControllerRemoveRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface CampaignControllerRemoveRequest { + id: string; +} diff --git a/src/api/resources/campaigns/client/requests/CreateCampaignDto.ts b/src/api/resources/campaigns/client/requests/CreateCampaignDto.ts index c80535bf..19245af7 100644 --- a/src/api/resources/campaigns/client/requests/CreateCampaignDto.ts +++ b/src/api/resources/campaigns/client/requests/CreateCampaignDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example @@ -21,7 +19,7 @@ export interface CreateCampaignDto { workflowId?: string; /** This is the phone number ID that will be used for the campaign calls. */ phoneNumberId: string; - /** This is the schedule plan for the campaign. */ + /** 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. */ schedulePlan?: Vapi.SchedulePlan; /** These are the customers that will be called in the campaign. */ customers: Vapi.CreateCustomerDto[]; diff --git a/src/api/resources/campaigns/client/requests/UpdateCampaignDto.ts b/src/api/resources/campaigns/client/requests/UpdateCampaignDto.ts index c06c1c06..1f28abd7 100644 --- a/src/api/resources/campaigns/client/requests/UpdateCampaignDto.ts +++ b/src/api/resources/campaigns/client/requests/UpdateCampaignDto.ts @@ -1,14 +1,15 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * {} + * { + * id: "id" + * } */ export interface UpdateCampaignDto { + id: string; /** This is the name of the campaign. This is just for your own reference. */ name?: string; /** @@ -36,5 +37,5 @@ export interface UpdateCampaignDto { * 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. */ - status?: "ended"; + status?: Vapi.UpdateCampaignDtoStatus; } diff --git a/src/api/resources/campaigns/client/requests/index.ts b/src/api/resources/campaigns/client/requests/index.ts index dceefd72..4a810eeb 100644 --- a/src/api/resources/campaigns/client/requests/index.ts +++ b/src/api/resources/campaigns/client/requests/index.ts @@ -1,3 +1,5 @@ -export { type CampaignControllerFindAllRequest } from "./CampaignControllerFindAllRequest.js"; -export { type CreateCampaignDto } from "./CreateCampaignDto.js"; -export { type UpdateCampaignDto } from "./UpdateCampaignDto.js"; +export type { CampaignControllerFindAllRequest } from "./CampaignControllerFindAllRequest.js"; +export type { CampaignControllerFindOneRequest } from "./CampaignControllerFindOneRequest.js"; +export type { CampaignControllerRemoveRequest } from "./CampaignControllerRemoveRequest.js"; +export type { CreateCampaignDto } from "./CreateCampaignDto.js"; +export type { UpdateCampaignDto } from "./UpdateCampaignDto.js"; diff --git a/src/api/resources/campaigns/index.ts b/src/api/resources/campaigns/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/campaigns/index.ts +++ b/src/api/resources/campaigns/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/campaigns/types/CampaignControllerFindAllRequestSortOrder.ts b/src/api/resources/campaigns/types/CampaignControllerFindAllRequestSortOrder.ts index a26b63bb..2c4b2c9b 100644 --- a/src/api/resources/campaigns/types/CampaignControllerFindAllRequestSortOrder.ts +++ b/src/api/resources/campaigns/types/CampaignControllerFindAllRequestSortOrder.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CampaignControllerFindAllRequestSortOrder = "ASC" | "DESC"; export const CampaignControllerFindAllRequestSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type CampaignControllerFindAllRequestSortOrder = + (typeof CampaignControllerFindAllRequestSortOrder)[keyof typeof CampaignControllerFindAllRequestSortOrder]; diff --git a/src/api/resources/campaigns/types/CampaignControllerFindAllRequestStatus.ts b/src/api/resources/campaigns/types/CampaignControllerFindAllRequestStatus.ts index 8f1c4f64..e063be84 100644 --- a/src/api/resources/campaigns/types/CampaignControllerFindAllRequestStatus.ts +++ b/src/api/resources/campaigns/types/CampaignControllerFindAllRequestStatus.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CampaignControllerFindAllRequestStatus = "scheduled" | "in-progress" | "ended"; export const CampaignControllerFindAllRequestStatus = { Scheduled: "scheduled", InProgress: "in-progress", Ended: "ended", } as const; +export type CampaignControllerFindAllRequestStatus = + (typeof CampaignControllerFindAllRequestStatus)[keyof typeof CampaignControllerFindAllRequestStatus]; diff --git a/src/api/resources/campaigns/types/UpdateCampaignDtoStatus.ts b/src/api/resources/campaigns/types/UpdateCampaignDtoStatus.ts new file mode 100644 index 00000000..3da73eaa --- /dev/null +++ b/src/api/resources/campaigns/types/UpdateCampaignDtoStatus.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const UpdateCampaignDtoStatus = { + Ended: "ended", +} as const; +export type UpdateCampaignDtoStatus = (typeof UpdateCampaignDtoStatus)[keyof typeof UpdateCampaignDtoStatus]; diff --git a/src/api/resources/campaigns/types/index.ts b/src/api/resources/campaigns/types/index.ts index aebddfbb..c6eb5e02 100644 --- a/src/api/resources/campaigns/types/index.ts +++ b/src/api/resources/campaigns/types/index.ts @@ -1,2 +1,3 @@ -export * from "./CampaignControllerFindAllRequestStatus.js"; export * from "./CampaignControllerFindAllRequestSortOrder.js"; +export * from "./CampaignControllerFindAllRequestStatus.js"; +export * from "./UpdateCampaignDtoStatus.js"; diff --git a/src/api/resources/chats/client/Client.ts b/src/api/resources/chats/client/Client.ts index 4edd0650..ce3a85db 100644 --- a/src/api/resources/chats/client/Client.ts +++ b/src/api/resources/chats/client/Client.ts @@ -1,84 +1,49 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Chats { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace ChatsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Chats { - protected readonly _options: Chats.Options; +export class ChatsClient { + protected readonly _options: ChatsClient.Options; - constructor(_options: Chats.Options) { - this._options = _options; + constructor(options: ChatsClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {Vapi.ChatsListRequest} request - * @param {Chats.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ListChatsRequest} request + * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.chats.list({ - * assistantId: "assistantId", - * squadId: "squadId", - * workflowId: "workflowId", - * sessionId: "sessionId", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.chats.list() */ public list( - request: Vapi.ChatsListRequest = {}, - requestOptions?: Chats.RequestOptions, + request: Vapi.ListChatsRequest = {}, + requestOptions?: ChatsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); } private async __list( - request: Vapi.ChatsListRequest = {}, - requestOptions?: Chats.RequestOptions, + request: Vapi.ListChatsRequest = {}, + requestOptions?: ChatsClient.RequestOptions, ): Promise> { const { assistantId, squadId, - workflowId, sessionId, + previousChatId, page, sortOrder, limit, @@ -92,67 +57,67 @@ export class Chats { updatedAtLe, } = request; const _queryParams: Record = {}; - if (assistantId !== undefined) { - _queryParams["assistantId"] = assistantId; + if (assistantId != null) { + _queryParams.assistantId = assistantId; } - if (squadId !== undefined) { - _queryParams["squadId"] = squadId; + if (squadId != null) { + _queryParams.squadId = squadId; } - if (workflowId !== undefined) { - _queryParams["workflowId"] = workflowId; + if (sessionId != null) { + _queryParams.sessionId = sessionId; } - if (sessionId !== undefined) { - _queryParams["sessionId"] = sessionId; + if (previousChatId != null) { + _queryParams.previousChatId = previousChatId; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (page != null) { + _queryParams.page = page.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -167,9 +132,11 @@ export class Chats { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.ChatPaginatedResponse, rawResponse: _response.rawResponse }; @@ -204,7 +171,7 @@ export class Chats { * 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). * * @param {Vapi.CreateChatDto} request - * @param {Chats.RequestOptions} requestOptions - Request-specific configuration. + * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.chats.create({ @@ -213,16 +180,16 @@ export class Chats { */ public create( request: Vapi.CreateChatDto, - requestOptions?: Chats.RequestOptions, - ): core.HttpResponsePromise { + requestOptions?: ChatsClient.RequestOptions, + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( request: Vapi.CreateChatDto, - requestOptions?: Chats.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + requestOptions?: ChatsClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -240,12 +207,14 @@ export class Chats { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.ChatsCreateResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.CreateChatsResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -274,18 +243,27 @@ export class Chats { } /** - * @param {string} id - * @param {Chats.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.GetChatsRequest} request + * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.chats.get("id") + * await client.chats.get({ + * id: "id" + * }) */ - public get(id: string, requestOptions?: Chats.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + public get( + request: Vapi.GetChatsRequest, + requestOptions?: ChatsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } - private async __get(id: string, requestOptions?: Chats.RequestOptions): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + private async __get( + request: Vapi.GetChatsRequest, + requestOptions?: ChatsClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -295,14 +273,16 @@ export class Chats { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `chat/${encodeURIComponent(id)}`, + `chat/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Chat, rawResponse: _response.rawResponse }; @@ -334,21 +314,27 @@ export class Chats { } /** - * @param {string} id - * @param {Chats.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.DeleteChatsRequest} request + * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.chats.delete("id") + * await client.chats.delete({ + * id: "id" + * }) */ - public delete(id: string, requestOptions?: Chats.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + public delete( + request: Vapi.DeleteChatsRequest, + requestOptions?: ChatsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions)); } private async __delete( - id: string, - requestOptions?: Chats.RequestOptions, + request: Vapi.DeleteChatsRequest, + requestOptions?: ChatsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -358,14 +344,16 @@ export class Chats { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `chat/${encodeURIComponent(id)}`, + `chat/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Chat, rawResponse: _response.rawResponse }; @@ -398,7 +386,7 @@ export class Chats { /** * @param {Vapi.OpenAiResponsesRequest} request - * @param {Chats.RequestOptions} requestOptions - Request-specific configuration. + * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.chats.createResponse({ @@ -407,16 +395,16 @@ export class Chats { */ public createResponse( request: Vapi.OpenAiResponsesRequest, - requestOptions?: Chats.RequestOptions, - ): core.HttpResponsePromise { + requestOptions?: ChatsClient.RequestOptions, + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__createResponse(request, requestOptions)); } private async __createResponse( request: Vapi.OpenAiResponsesRequest, - requestOptions?: Chats.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + requestOptions?: ChatsClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -434,12 +422,14 @@ export class Chats { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.ChatsCreateResponseResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.CreateResponseChatsResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/chats/client/index.ts b/src/api/resources/chats/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/chats/client/index.ts +++ b/src/api/resources/chats/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/chats/client/requests/ChatsListRequest.ts b/src/api/resources/chats/client/requests/ChatsListRequest.ts deleted file mode 100644 index d52edda1..00000000 --- a/src/api/resources/chats/client/requests/ChatsListRequest.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../../index.js"; - -/** - * @example - * { - * assistantId: "assistantId", - * squadId: "squadId", - * workflowId: "workflowId", - * sessionId: "sessionId", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } - */ -export interface ChatsListRequest { - /** This is the unique identifier for the assistant that will be used for the chat. */ - assistantId?: string | null; - /** This is the unique identifier for the squad that will be used for the chat. */ - squadId?: string | null; - /** This is the unique identifier for the workflow that will be used for the chat. */ - workflowId?: string | null; - /** This is the unique identifier for the session that will be used for the chat. */ - sessionId?: string | null; - /** This is the page number to return. Defaults to 1. */ - page?: number | null; - /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.ChatsListRequestSortOrder | null; - /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; - /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; - /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; - /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; - /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; - /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; - /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; - /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; - /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; -} diff --git a/src/api/resources/chats/client/requests/CreateChatDto.ts b/src/api/resources/chats/client/requests/CreateChatDto.ts index 5a56f2bc..931b2b6a 100644 --- a/src/api/resources/chats/client/requests/CreateChatDto.ts +++ b/src/api/resources/chats/client/requests/CreateChatDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example diff --git a/src/api/resources/chats/client/requests/DeleteChatsRequest.ts b/src/api/resources/chats/client/requests/DeleteChatsRequest.ts new file mode 100644 index 00000000..0400905d --- /dev/null +++ b/src/api/resources/chats/client/requests/DeleteChatsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface DeleteChatsRequest { + id: string; +} diff --git a/src/api/resources/chats/client/requests/GetChatsRequest.ts b/src/api/resources/chats/client/requests/GetChatsRequest.ts new file mode 100644 index 00000000..631754cc --- /dev/null +++ b/src/api/resources/chats/client/requests/GetChatsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface GetChatsRequest { + id: string; +} diff --git a/src/api/resources/chats/client/requests/ListChatsRequest.ts b/src/api/resources/chats/client/requests/ListChatsRequest.ts new file mode 100644 index 00000000..cee3b9e5 --- /dev/null +++ b/src/api/resources/chats/client/requests/ListChatsRequest.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * {} + */ +export interface ListChatsRequest { + /** This is the unique identifier for the assistant that will be used for the chat. */ + assistantId?: string; + /** This is the unique identifier for the squad that will be used for the chat. */ + squadId?: string; + /** This is the unique identifier for the session that will be used for the chat. */ + sessionId?: string; + /** This is the unique identifier for the previous chat to filter by. */ + previousChatId?: string; + /** This is the page number to return. Defaults to 1. */ + page?: number; + /** This is the sort order for pagination. Defaults to 'DESC'. */ + sortOrder?: Vapi.ListChatsRequestSortOrder; + /** This is the maximum number of items to return. Defaults to 100. */ + limit?: number; + /** This will return items where the createdAt is greater than the specified value. */ + createdAtGt?: string; + /** This will return items where the createdAt is less than the specified value. */ + createdAtLt?: string; + /** This will return items where the createdAt is greater than or equal to the specified value. */ + createdAtGe?: string; + /** This will return items where the createdAt is less than or equal to the specified value. */ + createdAtLe?: string; + /** This will return items where the updatedAt is greater than the specified value. */ + updatedAtGt?: string; + /** This will return items where the updatedAt is less than the specified value. */ + updatedAtLt?: string; + /** This will return items where the updatedAt is greater than or equal to the specified value. */ + updatedAtGe?: string; + /** This will return items where the updatedAt is less than or equal to the specified value. */ + updatedAtLe?: string; +} diff --git a/src/api/resources/chats/client/requests/OpenAiResponsesRequest.ts b/src/api/resources/chats/client/requests/OpenAiResponsesRequest.ts index 1df698c0..6262f09e 100644 --- a/src/api/resources/chats/client/requests/OpenAiResponsesRequest.ts +++ b/src/api/resources/chats/client/requests/OpenAiResponsesRequest.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example diff --git a/src/api/resources/chats/client/requests/index.ts b/src/api/resources/chats/client/requests/index.ts index 350b477c..4448e471 100644 --- a/src/api/resources/chats/client/requests/index.ts +++ b/src/api/resources/chats/client/requests/index.ts @@ -1,3 +1,5 @@ -export { type ChatsListRequest } from "./ChatsListRequest.js"; -export { type CreateChatDto } from "./CreateChatDto.js"; -export { type OpenAiResponsesRequest } from "./OpenAiResponsesRequest.js"; +export type { CreateChatDto } from "./CreateChatDto.js"; +export type { DeleteChatsRequest } from "./DeleteChatsRequest.js"; +export type { GetChatsRequest } from "./GetChatsRequest.js"; +export type { ListChatsRequest } from "./ListChatsRequest.js"; +export type { OpenAiResponsesRequest } from "./OpenAiResponsesRequest.js"; diff --git a/src/api/resources/chats/index.ts b/src/api/resources/chats/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/chats/index.ts +++ b/src/api/resources/chats/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/chats/types/ChatsCreateResponse.ts b/src/api/resources/chats/types/ChatsCreateResponse.ts deleted file mode 100644 index d2e3d73a..00000000 --- a/src/api/resources/chats/types/ChatsCreateResponse.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type ChatsCreateResponse = Vapi.Chat | Vapi.CreateChatStreamResponse; diff --git a/src/api/resources/chats/types/ChatsListRequestSortOrder.ts b/src/api/resources/chats/types/ChatsListRequestSortOrder.ts deleted file mode 100644 index b3a6e99a..00000000 --- a/src/api/resources/chats/types/ChatsListRequestSortOrder.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type ChatsListRequestSortOrder = "ASC" | "DESC"; -export const ChatsListRequestSortOrder = { - Asc: "ASC", - Desc: "DESC", -} as const; diff --git a/src/api/resources/chats/types/CreateChatDtoInput.ts b/src/api/resources/chats/types/CreateChatDtoInput.ts index 1cf027f3..33501e53 100644 --- a/src/api/resources/chats/types/CreateChatDtoInput.ts +++ b/src/api/resources/chats/types/CreateChatDtoInput.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * 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. */ -export type CreateChatDtoInput = string | Vapi.CreateChatDtoInputItem[]; +export type CreateChatDtoInput = string | Vapi.CreateChatDtoInputOneItem[]; diff --git a/src/api/resources/chats/types/CreateChatDtoInputItem.ts b/src/api/resources/chats/types/CreateChatDtoInputItem.ts deleted file mode 100644 index 89d67f41..00000000 --- a/src/api/resources/chats/types/CreateChatDtoInputItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type CreateChatDtoInputItem = - | Vapi.SystemMessage - | Vapi.UserMessage - | Vapi.AssistantMessage - | Vapi.ToolMessage - | Vapi.DeveloperMessage; diff --git a/src/api/resources/chats/types/CreateChatDtoInputOneItem.ts b/src/api/resources/chats/types/CreateChatDtoInputOneItem.ts new file mode 100644 index 00000000..8be5380b --- /dev/null +++ b/src/api/resources/chats/types/CreateChatDtoInputOneItem.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type CreateChatDtoInputOneItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/resources/chats/types/CreateChatsResponse.ts b/src/api/resources/chats/types/CreateChatsResponse.ts new file mode 100644 index 00000000..7edb240c --- /dev/null +++ b/src/api/resources/chats/types/CreateChatsResponse.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type CreateChatsResponse = Vapi.Chat | Vapi.CreateChatStreamResponse; diff --git a/src/api/resources/chats/types/ChatsCreateResponseResponse.ts b/src/api/resources/chats/types/CreateResponseChatsResponse.ts similarity index 50% rename from src/api/resources/chats/types/ChatsCreateResponseResponse.ts rename to src/api/resources/chats/types/CreateResponseChatsResponse.ts index 1fac1da1..76e7cacb 100644 --- a/src/api/resources/chats/types/ChatsCreateResponseResponse.ts +++ b/src/api/resources/chats/types/CreateResponseChatsResponse.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type ChatsCreateResponseResponse = +export type CreateResponseChatsResponse = | Vapi.ResponseObject | Vapi.ResponseTextDeltaEvent | Vapi.ResponseTextDoneEvent diff --git a/src/api/resources/chats/types/ListChatsRequestSortOrder.ts b/src/api/resources/chats/types/ListChatsRequestSortOrder.ts new file mode 100644 index 00000000..6cceb0cb --- /dev/null +++ b/src/api/resources/chats/types/ListChatsRequestSortOrder.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ListChatsRequestSortOrder = { + Asc: "ASC", + Desc: "DESC", +} as const; +export type ListChatsRequestSortOrder = (typeof ListChatsRequestSortOrder)[keyof typeof ListChatsRequestSortOrder]; diff --git a/src/api/resources/chats/types/OpenAiResponsesRequestInput.ts b/src/api/resources/chats/types/OpenAiResponsesRequestInput.ts index a093cadb..c754e700 100644 --- a/src/api/resources/chats/types/OpenAiResponsesRequestInput.ts +++ b/src/api/resources/chats/types/OpenAiResponsesRequestInput.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * 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. */ -export type OpenAiResponsesRequestInput = string | Vapi.OpenAiResponsesRequestInputItem[]; +export type OpenAiResponsesRequestInput = string | Vapi.OpenAiResponsesRequestInputOneItem[]; diff --git a/src/api/resources/chats/types/OpenAiResponsesRequestInputItem.ts b/src/api/resources/chats/types/OpenAiResponsesRequestInputItem.ts deleted file mode 100644 index fc341ce3..00000000 --- a/src/api/resources/chats/types/OpenAiResponsesRequestInputItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type OpenAiResponsesRequestInputItem = - | Vapi.SystemMessage - | Vapi.UserMessage - | Vapi.AssistantMessage - | Vapi.ToolMessage - | Vapi.DeveloperMessage; diff --git a/src/api/resources/chats/types/OpenAiResponsesRequestInputOneItem.ts b/src/api/resources/chats/types/OpenAiResponsesRequestInputOneItem.ts new file mode 100644 index 00000000..46eaee40 --- /dev/null +++ b/src/api/resources/chats/types/OpenAiResponsesRequestInputOneItem.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type OpenAiResponsesRequestInputOneItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/resources/chats/types/index.ts b/src/api/resources/chats/types/index.ts index 9cb2518e..543ead75 100644 --- a/src/api/resources/chats/types/index.ts +++ b/src/api/resources/chats/types/index.ts @@ -1,7 +1,7 @@ -export * from "./ChatsListRequestSortOrder.js"; -export * from "./CreateChatDtoInputItem.js"; export * from "./CreateChatDtoInput.js"; -export * from "./ChatsCreateResponse.js"; -export * from "./OpenAiResponsesRequestInputItem.js"; +export * from "./CreateChatDtoInputOneItem.js"; +export * from "./CreateChatsResponse.js"; +export * from "./CreateResponseChatsResponse.js"; +export * from "./ListChatsRequestSortOrder.js"; export * from "./OpenAiResponsesRequestInput.js"; -export * from "./ChatsCreateResponseResponse.js"; +export * from "./OpenAiResponsesRequestInputOneItem.js"; diff --git a/src/api/resources/eval/client/Client.ts b/src/api/resources/eval/client/Client.ts index 7e491caf..471880b1 100644 --- a/src/api/resources/eval/client/Client.ts +++ b/src/api/resources/eval/client/Client.ts @@ -1,75 +1,43 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Eval { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace EvalClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Eval { - protected readonly _options: Eval.Options; +export class EvalClient { + protected readonly _options: EvalClient.Options; - constructor(_options: Eval.Options) { - this._options = _options; + constructor(options: EvalClient.Options) { + this._options = normalizeClientOptions(options); } /** * @param {Vapi.EvalControllerGetPaginatedRequest} request - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.eval.evalControllerGetPaginated({ - * id: "id", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.eval.evalControllerGetPaginated() */ public evalControllerGetPaginated( request: Vapi.EvalControllerGetPaginatedRequest = {}, - requestOptions?: Eval.RequestOptions, + requestOptions?: EvalClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__evalControllerGetPaginated(request, requestOptions)); } private async __evalControllerGetPaginated( request: Vapi.EvalControllerGetPaginatedRequest = {}, - requestOptions?: Eval.RequestOptions, + requestOptions?: EvalClient.RequestOptions, ): Promise> { const { id, @@ -86,55 +54,55 @@ export class Eval { updatedAtLe, } = request; const _queryParams: Record = {}; - if (id !== undefined) { - _queryParams["id"] = id; + if (id != null) { + _queryParams.id = id; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (page != null) { + _queryParams.page = page.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -149,9 +117,11 @@ export class Eval { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.EvalPaginatedResponse, rawResponse: _response.rawResponse }; @@ -184,7 +154,7 @@ export class Eval { /** * @param {Vapi.CreateEvalDto} request - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.eval.evalControllerCreate({ @@ -196,16 +166,16 @@ export class Eval { */ public evalControllerCreate( request: Vapi.CreateEvalDto, - requestOptions?: Eval.RequestOptions, + requestOptions?: EvalClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__evalControllerCreate(request, requestOptions)); } private async __evalControllerCreate( request: Vapi.CreateEvalDto, - requestOptions?: Eval.RequestOptions, + requestOptions?: EvalClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -223,9 +193,11 @@ export class Eval { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Eval, rawResponse: _response.rawResponse }; @@ -257,21 +229,27 @@ export class Eval { } /** - * @param {string} id - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.EvalControllerGetRequest} request + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.eval.evalControllerGet("id") + * await client.eval.evalControllerGet({ + * id: "id" + * }) */ - public evalControllerGet(id: string, requestOptions?: Eval.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__evalControllerGet(id, requestOptions)); + public evalControllerGet( + request: Vapi.EvalControllerGetRequest, + requestOptions?: EvalClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__evalControllerGet(request, requestOptions)); } private async __evalControllerGet( - id: string, - requestOptions?: Eval.RequestOptions, + request: Vapi.EvalControllerGetRequest, + requestOptions?: EvalClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -281,14 +259,16 @@ export class Eval { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `eval/${encodeURIComponent(id)}`, + `eval/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Eval, rawResponse: _response.rawResponse }; @@ -320,21 +300,27 @@ export class Eval { } /** - * @param {string} id - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.EvalControllerRemoveRequest} request + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.eval.evalControllerRemove("id") + * await client.eval.evalControllerRemove({ + * id: "id" + * }) */ - public evalControllerRemove(id: string, requestOptions?: Eval.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__evalControllerRemove(id, requestOptions)); + public evalControllerRemove( + request: Vapi.EvalControllerRemoveRequest, + requestOptions?: EvalClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__evalControllerRemove(request, requestOptions)); } private async __evalControllerRemove( - id: string, - requestOptions?: Eval.RequestOptions, + request: Vapi.EvalControllerRemoveRequest, + requestOptions?: EvalClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -344,14 +330,16 @@ export class Eval { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `eval/${encodeURIComponent(id)}`, + `eval/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Eval, rawResponse: _response.rawResponse }; @@ -383,27 +371,27 @@ export class Eval { } /** - * @param {string} id * @param {Vapi.UpdateEvalDto} request - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.eval.evalControllerUpdate("id") + * await client.eval.evalControllerUpdate({ + * id: "id" + * }) */ public evalControllerUpdate( - id: string, - request: Vapi.UpdateEvalDto = {}, - requestOptions?: Eval.RequestOptions, + request: Vapi.UpdateEvalDto, + requestOptions?: EvalClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__evalControllerUpdate(id, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__evalControllerUpdate(request, requestOptions)); } private async __evalControllerUpdate( - id: string, - request: Vapi.UpdateEvalDto = {}, - requestOptions?: Eval.RequestOptions, + request: Vapi.UpdateEvalDto, + requestOptions?: EvalClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -413,17 +401,19 @@ export class Eval { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `eval/${encodeURIComponent(id)}`, + `eval/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Eval, rawResponse: _response.rawResponse }; @@ -455,24 +445,27 @@ export class Eval { } /** - * @param {string} id - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.EvalControllerGetRunRequest} request + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.eval.evalControllerGetRun("id") + * await client.eval.evalControllerGetRun({ + * id: "id" + * }) */ public evalControllerGetRun( - id: string, - requestOptions?: Eval.RequestOptions, + request: Vapi.EvalControllerGetRunRequest, + requestOptions?: EvalClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__evalControllerGetRun(id, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__evalControllerGetRun(request, requestOptions)); } private async __evalControllerGetRun( - id: string, - requestOptions?: Eval.RequestOptions, + request: Vapi.EvalControllerGetRunRequest, + requestOptions?: EvalClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -482,14 +475,16 @@ export class Eval { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `eval/run/${encodeURIComponent(id)}`, + `eval/run/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.EvalRun, rawResponse: _response.rawResponse }; @@ -521,24 +516,27 @@ export class Eval { } /** - * @param {string} id - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.EvalControllerRemoveRunRequest} request + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.eval.evalControllerRemoveRun("id") + * await client.eval.evalControllerRemoveRun({ + * id: "id" + * }) */ public evalControllerRemoveRun( - id: string, - requestOptions?: Eval.RequestOptions, + request: Vapi.EvalControllerRemoveRunRequest, + requestOptions?: EvalClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__evalControllerRemoveRun(id, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__evalControllerRemoveRun(request, requestOptions)); } private async __evalControllerRemoveRun( - id: string, - requestOptions?: Eval.RequestOptions, + request: Vapi.EvalControllerRemoveRunRequest, + requestOptions?: EvalClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -548,14 +546,16 @@ export class Eval { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `eval/run/${encodeURIComponent(id)}`, + `eval/run/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.EvalRun, rawResponse: _response.rawResponse }; @@ -588,34 +588,21 @@ export class Eval { /** * @param {Vapi.EvalControllerGetRunsPaginatedRequest} request - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.eval.evalControllerGetRunsPaginated({ - * id: "id", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.eval.evalControllerGetRunsPaginated() */ public evalControllerGetRunsPaginated( request: Vapi.EvalControllerGetRunsPaginatedRequest = {}, - requestOptions?: Eval.RequestOptions, + requestOptions?: EvalClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__evalControllerGetRunsPaginated(request, requestOptions)); } private async __evalControllerGetRunsPaginated( request: Vapi.EvalControllerGetRunsPaginatedRequest = {}, - requestOptions?: Eval.RequestOptions, + requestOptions?: EvalClient.RequestOptions, ): Promise> { const { id, @@ -632,55 +619,55 @@ export class Eval { updatedAtLe, } = request; const _queryParams: Record = {}; - if (id !== undefined) { - _queryParams["id"] = id; + if (id != null) { + _queryParams.id = id; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (page != null) { + _queryParams.page = page.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -695,9 +682,11 @@ export class Eval { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.EvalRunPaginatedResponse, rawResponse: _response.rawResponse }; @@ -730,27 +719,28 @@ export class Eval { /** * @param {Vapi.CreateEvalRunDto} request - * @param {Eval.RequestOptions} requestOptions - Request-specific configuration. + * @param {EvalClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.eval.evalControllerRun({ * target: { * type: "assistant" - * } + * }, + * type: "eval" * }) */ public evalControllerRun( request: Vapi.CreateEvalRunDto, - requestOptions?: Eval.RequestOptions, + requestOptions?: EvalClient.RequestOptions, ): core.HttpResponsePromise> { return core.HttpResponsePromise.fromPromise(this.__evalControllerRun(request, requestOptions)); } private async __evalControllerRun( request: Vapi.CreateEvalRunDto, - requestOptions?: Eval.RequestOptions, + requestOptions?: EvalClient.RequestOptions, ): Promise>> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -767,10 +757,12 @@ export class Eval { contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: { ...request, type: "eval" }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Record, rawResponse: _response.rawResponse }; diff --git a/src/api/resources/eval/client/index.ts b/src/api/resources/eval/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/eval/client/index.ts +++ b/src/api/resources/eval/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/eval/client/requests/CreateEvalRunDto.ts b/src/api/resources/eval/client/requests/CreateEvalRunDto.ts index b0b4926a..b54d5f31 100644 --- a/src/api/resources/eval/client/requests/CreateEvalRunDto.ts +++ b/src/api/resources/eval/client/requests/CreateEvalRunDto.ts @@ -1,15 +1,14 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example * { * target: { * type: "assistant" - * } + * }, + * type: "eval" * } */ export interface CreateEvalRunDto { @@ -17,6 +16,11 @@ export interface CreateEvalRunDto { eval?: Vapi.CreateEvalDto; /** This is the target that will be run against the eval */ target: Vapi.CreateEvalRunDtoTarget; + /** + * This is the type of the run. + * Currently it is fixed to `eval`. + */ + type: Vapi.CreateEvalRunDtoType; /** This is the id of the eval that will be run. */ evalId?: string; } diff --git a/src/api/resources/eval/client/requests/EvalControllerGetPaginatedRequest.ts b/src/api/resources/eval/client/requests/EvalControllerGetPaginatedRequest.ts index 33ac7c58..ec615a27 100644 --- a/src/api/resources/eval/client/requests/EvalControllerGetPaginatedRequest.ts +++ b/src/api/resources/eval/client/requests/EvalControllerGetPaginatedRequest.ts @@ -1,48 +1,33 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * { - * id: "id", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ export interface EvalControllerGetPaginatedRequest { - id?: string | null; + id?: string; /** This is the page number to return. Defaults to 1. */ - page?: number | null; + page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.EvalControllerGetPaginatedRequestSortOrder | null; + sortOrder?: Vapi.EvalControllerGetPaginatedRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/eval/client/requests/EvalControllerGetRequest.ts b/src/api/resources/eval/client/requests/EvalControllerGetRequest.ts new file mode 100644 index 00000000..c0d4d7d3 --- /dev/null +++ b/src/api/resources/eval/client/requests/EvalControllerGetRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface EvalControllerGetRequest { + id: string; +} diff --git a/src/api/resources/eval/client/requests/EvalControllerGetRunRequest.ts b/src/api/resources/eval/client/requests/EvalControllerGetRunRequest.ts new file mode 100644 index 00000000..09b11482 --- /dev/null +++ b/src/api/resources/eval/client/requests/EvalControllerGetRunRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface EvalControllerGetRunRequest { + id: string; +} diff --git a/src/api/resources/eval/client/requests/EvalControllerGetRunsPaginatedRequest.ts b/src/api/resources/eval/client/requests/EvalControllerGetRunsPaginatedRequest.ts index 48e773c0..7fb65c0d 100644 --- a/src/api/resources/eval/client/requests/EvalControllerGetRunsPaginatedRequest.ts +++ b/src/api/resources/eval/client/requests/EvalControllerGetRunsPaginatedRequest.ts @@ -1,48 +1,33 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * { - * id: "id", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ export interface EvalControllerGetRunsPaginatedRequest { - id?: string | null; + id?: string; /** This is the page number to return. Defaults to 1. */ - page?: number | null; + page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.EvalControllerGetRunsPaginatedRequestSortOrder | null; + sortOrder?: Vapi.EvalControllerGetRunsPaginatedRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/eval/client/requests/EvalControllerRemoveRequest.ts b/src/api/resources/eval/client/requests/EvalControllerRemoveRequest.ts new file mode 100644 index 00000000..308e0f33 --- /dev/null +++ b/src/api/resources/eval/client/requests/EvalControllerRemoveRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface EvalControllerRemoveRequest { + id: string; +} diff --git a/src/api/resources/eval/client/requests/EvalControllerRemoveRunRequest.ts b/src/api/resources/eval/client/requests/EvalControllerRemoveRunRequest.ts new file mode 100644 index 00000000..3d4be523 --- /dev/null +++ b/src/api/resources/eval/client/requests/EvalControllerRemoveRunRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface EvalControllerRemoveRunRequest { + id: string; +} diff --git a/src/api/resources/eval/client/requests/UpdateEvalDto.ts b/src/api/resources/eval/client/requests/UpdateEvalDto.ts index df024b82..95fe1986 100644 --- a/src/api/resources/eval/client/requests/UpdateEvalDto.ts +++ b/src/api/resources/eval/client/requests/UpdateEvalDto.ts @@ -1,14 +1,15 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * {} + * { + * id: "id" + * } */ export interface UpdateEvalDto { + id: string; /** * This is the mock conversation that will be used to evaluate the flow of the conversation. * @@ -31,5 +32,5 @@ export interface UpdateEvalDto { * This is the type of the eval. * Currently it is fixed to `chat.mockConversation`. */ - type?: "chat.mockConversation"; + type?: Vapi.UpdateEvalDtoType; } diff --git a/src/api/resources/eval/client/requests/index.ts b/src/api/resources/eval/client/requests/index.ts index 381200a8..847a1eb8 100644 --- a/src/api/resources/eval/client/requests/index.ts +++ b/src/api/resources/eval/client/requests/index.ts @@ -1,4 +1,8 @@ -export { type EvalControllerGetPaginatedRequest } from "./EvalControllerGetPaginatedRequest.js"; -export { type UpdateEvalDto } from "./UpdateEvalDto.js"; -export { type EvalControllerGetRunsPaginatedRequest } from "./EvalControllerGetRunsPaginatedRequest.js"; -export { type CreateEvalRunDto } from "./CreateEvalRunDto.js"; +export type { CreateEvalRunDto } from "./CreateEvalRunDto.js"; +export type { EvalControllerGetPaginatedRequest } from "./EvalControllerGetPaginatedRequest.js"; +export type { EvalControllerGetRequest } from "./EvalControllerGetRequest.js"; +export type { EvalControllerGetRunRequest } from "./EvalControllerGetRunRequest.js"; +export type { EvalControllerGetRunsPaginatedRequest } from "./EvalControllerGetRunsPaginatedRequest.js"; +export type { EvalControllerRemoveRequest } from "./EvalControllerRemoveRequest.js"; +export type { EvalControllerRemoveRunRequest } from "./EvalControllerRemoveRunRequest.js"; +export type { UpdateEvalDto } from "./UpdateEvalDto.js"; diff --git a/src/api/resources/eval/index.ts b/src/api/resources/eval/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/eval/index.ts +++ b/src/api/resources/eval/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/eval/types/CreateEvalRunDtoTarget.ts b/src/api/resources/eval/types/CreateEvalRunDtoTarget.ts index 1a4119e3..aacbd894 100644 --- a/src/api/resources/eval/types/CreateEvalRunDtoTarget.ts +++ b/src/api/resources/eval/types/CreateEvalRunDtoTarget.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * This is the target that will be run against the eval diff --git a/src/api/resources/eval/types/CreateEvalRunDtoType.ts b/src/api/resources/eval/types/CreateEvalRunDtoType.ts new file mode 100644 index 00000000..d822c22b --- /dev/null +++ b/src/api/resources/eval/types/CreateEvalRunDtoType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the run. + * Currently it is fixed to `eval`. + */ +export const CreateEvalRunDtoType = { + Eval: "eval", +} as const; +export type CreateEvalRunDtoType = (typeof CreateEvalRunDtoType)[keyof typeof CreateEvalRunDtoType]; diff --git a/src/api/resources/eval/types/EvalControllerGetPaginatedRequestSortOrder.ts b/src/api/resources/eval/types/EvalControllerGetPaginatedRequestSortOrder.ts index d6bbfb80..e744733b 100644 --- a/src/api/resources/eval/types/EvalControllerGetPaginatedRequestSortOrder.ts +++ b/src/api/resources/eval/types/EvalControllerGetPaginatedRequestSortOrder.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type EvalControllerGetPaginatedRequestSortOrder = "ASC" | "DESC"; export const EvalControllerGetPaginatedRequestSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type EvalControllerGetPaginatedRequestSortOrder = + (typeof EvalControllerGetPaginatedRequestSortOrder)[keyof typeof EvalControllerGetPaginatedRequestSortOrder]; diff --git a/src/api/resources/eval/types/EvalControllerGetRunsPaginatedRequestSortOrder.ts b/src/api/resources/eval/types/EvalControllerGetRunsPaginatedRequestSortOrder.ts index f6695f52..323f5bbe 100644 --- a/src/api/resources/eval/types/EvalControllerGetRunsPaginatedRequestSortOrder.ts +++ b/src/api/resources/eval/types/EvalControllerGetRunsPaginatedRequestSortOrder.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type EvalControllerGetRunsPaginatedRequestSortOrder = "ASC" | "DESC"; export const EvalControllerGetRunsPaginatedRequestSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type EvalControllerGetRunsPaginatedRequestSortOrder = + (typeof EvalControllerGetRunsPaginatedRequestSortOrder)[keyof typeof EvalControllerGetRunsPaginatedRequestSortOrder]; diff --git a/src/api/resources/eval/types/UpdateEvalDtoMessagesItem.ts b/src/api/resources/eval/types/UpdateEvalDtoMessagesItem.ts index f0b356ed..69e8230d 100644 --- a/src/api/resources/eval/types/UpdateEvalDtoMessagesItem.ts +++ b/src/api/resources/eval/types/UpdateEvalDtoMessagesItem.ts @@ -1,12 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; export type UpdateEvalDtoMessagesItem = | Vapi.ChatEvalAssistantMessageMock | Vapi.ChatEvalSystemMessageMock | Vapi.ChatEvalToolResponseMessageMock + | Vapi.ChatEvalToolResponseMessageEvaluation | Vapi.ChatEvalUserMessageMock | Vapi.ChatEvalAssistantMessageEvaluation; diff --git a/src/api/resources/eval/types/UpdateEvalDtoType.ts b/src/api/resources/eval/types/UpdateEvalDtoType.ts new file mode 100644 index 00000000..daa5ace6 --- /dev/null +++ b/src/api/resources/eval/types/UpdateEvalDtoType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the eval. + * Currently it is fixed to `chat.mockConversation`. + */ +export const UpdateEvalDtoType = { + ChatMockConversation: "chat.mockConversation", +} as const; +export type UpdateEvalDtoType = (typeof UpdateEvalDtoType)[keyof typeof UpdateEvalDtoType]; diff --git a/src/api/resources/eval/types/index.ts b/src/api/resources/eval/types/index.ts index c6ac48f7..39f41742 100644 --- a/src/api/resources/eval/types/index.ts +++ b/src/api/resources/eval/types/index.ts @@ -1,4 +1,6 @@ +export * from "./CreateEvalRunDtoTarget.js"; +export * from "./CreateEvalRunDtoType.js"; export * from "./EvalControllerGetPaginatedRequestSortOrder.js"; -export * from "./UpdateEvalDtoMessagesItem.js"; export * from "./EvalControllerGetRunsPaginatedRequestSortOrder.js"; -export * from "./CreateEvalRunDtoTarget.js"; +export * from "./UpdateEvalDtoMessagesItem.js"; +export * from "./UpdateEvalDtoType.js"; diff --git a/src/api/resources/files/client/Client.ts b/src/api/resources/files/client/Client.ts index 8839e262..0b6e6ee4 100644 --- a/src/api/resources/files/client/Client.ts +++ b/src/api/resources/files/client/Client.ts @@ -1,58 +1,38 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; -import * as fs from "fs"; +import * as Vapi from "../../../index.js"; -export declare namespace Files { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace FilesClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Files { - protected readonly _options: Files.Options; +export class FilesClient { + protected readonly _options: FilesClient.Options; - constructor(_options: Files.Options) { - this._options = _options; + constructor(options: FilesClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.files.list() */ - public list(requestOptions?: Files.RequestOptions): core.HttpResponsePromise { + public list(requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__list(requestOptions)); } - private async __list(requestOptions?: Files.RequestOptions): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + private async __list(requestOptions?: FilesClient.RequestOptions): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -67,9 +47,11 @@ export class Files { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.File_[], rawResponse: _response.rawResponse }; @@ -102,7 +84,7 @@ export class Files { /** * @param {Vapi.CreateFileDto} request - * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vapi.BadRequestError} * @@ -114,19 +96,19 @@ export class Files { */ public create( request: Vapi.CreateFileDto, - requestOptions?: Files.RequestOptions, + requestOptions?: FilesClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( request: Vapi.CreateFileDto, - requestOptions?: Files.RequestOptions, + requestOptions?: FilesClient.RequestOptions, ): Promise> { const _request = await core.newFormData(); await _request.appendFile("file", request.file); const _maybeEncodedRequest = await _request.getRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(), @@ -147,9 +129,11 @@ export class Files { requestType: "file", duplex: _maybeEncodedRequest.duplex, body: _maybeEncodedRequest.body, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.File_, rawResponse: _response.rawResponse }; @@ -186,18 +170,27 @@ export class Files { } /** - * @param {string} id - * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.GetFilesRequest} request + * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.files.get("id") + * await client.files.get({ + * id: "id" + * }) */ - public get(id: string, requestOptions?: Files.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + public get( + request: Vapi.GetFilesRequest, + requestOptions?: FilesClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } - private async __get(id: string, requestOptions?: Files.RequestOptions): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + private async __get( + request: Vapi.GetFilesRequest, + requestOptions?: FilesClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -207,14 +200,16 @@ export class Files { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `file/${encodeURIComponent(id)}`, + `file/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.File_, rawResponse: _response.rawResponse }; @@ -246,21 +241,27 @@ export class Files { } /** - * @param {string} id - * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.DeleteFilesRequest} request + * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.files.delete("id") + * await client.files.delete({ + * id: "id" + * }) */ - public delete(id: string, requestOptions?: Files.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + public delete( + request: Vapi.DeleteFilesRequest, + requestOptions?: FilesClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions)); } private async __delete( - id: string, - requestOptions?: Files.RequestOptions, + request: Vapi.DeleteFilesRequest, + requestOptions?: FilesClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -270,14 +271,16 @@ export class Files { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `file/${encodeURIComponent(id)}`, + `file/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.File_, rawResponse: _response.rawResponse }; @@ -309,27 +312,27 @@ export class Files { } /** - * @param {string} id * @param {Vapi.UpdateFileDto} request - * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.files.update("id") + * await client.files.update({ + * id: "id" + * }) */ public update( - id: string, - request: Vapi.UpdateFileDto = {}, - requestOptions?: Files.RequestOptions, + request: Vapi.UpdateFileDto, + requestOptions?: FilesClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); } private async __update( - id: string, - request: Vapi.UpdateFileDto = {}, - requestOptions?: Files.RequestOptions, + request: Vapi.UpdateFileDto, + requestOptions?: FilesClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -339,17 +342,19 @@ export class Files { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `file/${encodeURIComponent(id)}`, + `file/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.File_, rawResponse: _response.rawResponse }; diff --git a/src/api/resources/files/client/index.ts b/src/api/resources/files/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/files/client/index.ts +++ b/src/api/resources/files/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/files/client/requests/CreateFileDto.ts b/src/api/resources/files/client/requests/CreateFileDto.ts index be4732f9..aa777793 100644 --- a/src/api/resources/files/client/requests/CreateFileDto.ts +++ b/src/api/resources/files/client/requests/CreateFileDto.ts @@ -1,9 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as fs from "fs"; -import * as core from "../../../../../core/index.js"; +import type * as core from "../../../../../core/index.js"; /** * @example @@ -13,5 +10,5 @@ import * as core from "../../../../../core/index.js"; */ export interface CreateFileDto { /** This is the File you want to upload for use with the Knowledge Base. */ - file: core.file.Uploadable.FileLike; + file: core.file.Uploadable; } diff --git a/src/api/resources/files/client/requests/DeleteFilesRequest.ts b/src/api/resources/files/client/requests/DeleteFilesRequest.ts new file mode 100644 index 00000000..31ea64cb --- /dev/null +++ b/src/api/resources/files/client/requests/DeleteFilesRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface DeleteFilesRequest { + id: string; +} diff --git a/src/api/resources/files/client/requests/GetFilesRequest.ts b/src/api/resources/files/client/requests/GetFilesRequest.ts new file mode 100644 index 00000000..b229354a --- /dev/null +++ b/src/api/resources/files/client/requests/GetFilesRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface GetFilesRequest { + id: string; +} diff --git a/src/api/resources/files/client/requests/UpdateFileDto.ts b/src/api/resources/files/client/requests/UpdateFileDto.ts index 8979b894..5c5cc901 100644 --- a/src/api/resources/files/client/requests/UpdateFileDto.ts +++ b/src/api/resources/files/client/requests/UpdateFileDto.ts @@ -1,12 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * @example - * {} + * { + * id: "id" + * } */ export interface UpdateFileDto { + id: string; /** This is the name of the file. This is just for your own reference. */ name?: string; } diff --git a/src/api/resources/files/client/requests/index.ts b/src/api/resources/files/client/requests/index.ts index 7a14be20..6c4072f7 100644 --- a/src/api/resources/files/client/requests/index.ts +++ b/src/api/resources/files/client/requests/index.ts @@ -1,2 +1,4 @@ -export { type CreateFileDto } from "./CreateFileDto.js"; -export { type UpdateFileDto } from "./UpdateFileDto.js"; +export type { CreateFileDto } from "./CreateFileDto.js"; +export type { DeleteFilesRequest } from "./DeleteFilesRequest.js"; +export type { GetFilesRequest } from "./GetFilesRequest.js"; +export type { UpdateFileDto } from "./UpdateFileDto.js"; diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 741867fb..b853c152 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,36 +1,42 @@ +export * from "./analytics/client/requests/index.js"; +export * as analytics from "./analytics/index.js"; +export * from "./assistants/client/requests/index.js"; export * as assistants from "./assistants/index.js"; export * from "./assistants/types/index.js"; +export * from "./calls/client/requests/index.js"; export * as calls from "./calls/index.js"; export * from "./calls/types/index.js"; -export * as chats from "./chats/index.js"; -export * from "./chats/types/index.js"; +export * from "./campaigns/client/requests/index.js"; export * as campaigns from "./campaigns/index.js"; export * from "./campaigns/types/index.js"; -export * as sessions from "./sessions/index.js"; -export * from "./sessions/types/index.js"; -export * as phoneNumbers from "./phoneNumbers/index.js"; -export * from "./phoneNumbers/types/index.js"; -export * as tools from "./tools/index.js"; -export * from "./tools/types/index.js"; -export * as structuredOutputs from "./structuredOutputs/index.js"; -export * from "./structuredOutputs/types/index.js"; +export * from "./chats/client/requests/index.js"; +export * as chats from "./chats/index.js"; +export * from "./chats/types/index.js"; +export * from "./eval/client/requests/index.js"; export * as eval from "./eval/index.js"; export * from "./eval/types/index.js"; +export * from "./files/client/requests/index.js"; +export * as files from "./files/index.js"; +export * from "./insight/client/requests/index.js"; +export * as insight from "./insight/index.js"; +export * from "./insight/types/index.js"; +export * from "./observabilityScorecard/client/requests/index.js"; +export * as observabilityScorecard from "./observabilityScorecard/index.js"; +export * from "./observabilityScorecard/types/index.js"; +export * from "./phoneNumbers/client/requests/index.js"; +export * as phoneNumbers from "./phoneNumbers/index.js"; +export * from "./phoneNumbers/types/index.js"; +export * from "./providerResources/client/requests/index.js"; export * as providerResources from "./providerResources/index.js"; export * from "./providerResources/types/index.js"; -export * as squads from "./squads/index.js"; -export * as files from "./files/index.js"; -export * as analytics from "./analytics/index.js"; -export * from "./assistants/client/requests/index.js"; -export * from "./squads/client/requests/index.js"; -export * from "./calls/client/requests/index.js"; -export * from "./chats/client/requests/index.js"; -export * from "./campaigns/client/requests/index.js"; export * from "./sessions/client/requests/index.js"; -export * from "./phoneNumbers/client/requests/index.js"; -export * from "./tools/client/requests/index.js"; -export * from "./files/client/requests/index.js"; +export * as sessions from "./sessions/index.js"; +export * from "./sessions/types/index.js"; +export * from "./squads/client/requests/index.js"; +export * as squads from "./squads/index.js"; export * from "./structuredOutputs/client/requests/index.js"; -export * from "./eval/client/requests/index.js"; -export * from "./providerResources/client/requests/index.js"; -export * from "./analytics/client/requests/index.js"; +export * as structuredOutputs from "./structuredOutputs/index.js"; +export * from "./structuredOutputs/types/index.js"; +export * from "./tools/client/requests/index.js"; +export * as tools from "./tools/index.js"; +export * from "./tools/types/index.js"; diff --git a/src/api/resources/insight/client/Client.ts b/src/api/resources/insight/client/Client.ts new file mode 100644 index 00000000..c35b4fda --- /dev/null +++ b/src/api/resources/insight/client/Client.ts @@ -0,0 +1,612 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; +import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; + +export declare namespace InsightClient { + export interface Options extends BaseClientOptions {} + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class InsightClient { + protected readonly _options: InsightClient.Options; + + constructor(options: InsightClient.Options) { + this._options = normalizeClientOptions(options); + } + + /** + * @param {Vapi.InsightControllerFindAllRequest} request + * @param {InsightClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.insight.insightControllerFindAll() + */ + public insightControllerFindAll( + request: Vapi.InsightControllerFindAllRequest = {}, + requestOptions?: InsightClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__insightControllerFindAll(request, requestOptions)); + } + + private async __insightControllerFindAll( + request: Vapi.InsightControllerFindAllRequest = {}, + requestOptions?: InsightClient.RequestOptions, + ): Promise> { + const { + id, + page, + sortOrder, + limit, + createdAtGt, + createdAtLt, + createdAtGe, + createdAtLe, + updatedAtGt, + updatedAtLt, + updatedAtGe, + updatedAtLe, + } = request; + const _queryParams: Record = {}; + if (id != null) { + _queryParams.id = id; + } + + if (page != null) { + _queryParams.page = page.toString(); + } + + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; + } + + if (limit != null) { + _queryParams.limit = limit.toString(); + } + + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; + } + + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; + } + + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; + } + + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; + } + + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; + } + + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; + } + + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; + } + + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; + } + + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + "reporting/insight", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.InsightPaginatedResponse, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling GET /reporting/insight."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.InsightControllerCreateRequest} request + * @param {InsightClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.insight.insightControllerCreate({ + * type: "bar", + * queries: [{ + * type: "vapiql-json", + * table: "call", + * column: "id", + * operation: "count" + * }] + * }) + */ + public insightControllerCreate( + request: Vapi.InsightControllerCreateRequest, + requestOptions?: InsightClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__insightControllerCreate(request, requestOptions)); + } + + private async __insightControllerCreate( + request: Vapi.InsightControllerCreateRequest, + requestOptions?: InsightClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + "reporting/insight", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.InsightControllerCreateResponse, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling POST /reporting/insight."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.InsightControllerFindOneRequest} request + * @param {InsightClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.insight.insightControllerFindOne({ + * id: "id" + * }) + */ + public insightControllerFindOne( + request: Vapi.InsightControllerFindOneRequest, + requestOptions?: InsightClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__insightControllerFindOne(request, requestOptions)); + } + + private async __insightControllerFindOne( + request: Vapi.InsightControllerFindOneRequest, + requestOptions?: InsightClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + `reporting/insight/${core.url.encodePathParam(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Vapi.InsightControllerFindOneResponse, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling GET /reporting/insight/{id}."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.InsightControllerRemoveRequest} request + * @param {InsightClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.insight.insightControllerRemove({ + * id: "id" + * }) + */ + public insightControllerRemove( + request: Vapi.InsightControllerRemoveRequest, + requestOptions?: InsightClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__insightControllerRemove(request, requestOptions)); + } + + private async __insightControllerRemove( + request: Vapi.InsightControllerRemoveRequest, + requestOptions?: InsightClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + `reporting/insight/${core.url.encodePathParam(id)}`, + ), + method: "DELETE", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.InsightControllerRemoveResponse, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling DELETE /reporting/insight/{id}."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.InsightControllerUpdateRequest} request + * @param {InsightClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.insight.insightControllerUpdate({ + * id: "id", + * body: { + * type: "bar" + * } + * }) + */ + public insightControllerUpdate( + request: Vapi.InsightControllerUpdateRequest, + requestOptions?: InsightClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__insightControllerUpdate(request, requestOptions)); + } + + private async __insightControllerUpdate( + request: Vapi.InsightControllerUpdateRequest, + requestOptions?: InsightClient.RequestOptions, + ): Promise> { + const { id, body: _body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + `reporting/insight/${core.url.encodePathParam(id)}`, + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.InsightControllerUpdateResponse, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling PATCH /reporting/insight/{id}."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.InsightRunDto} request + * @param {InsightClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.insight.insightControllerRun({ + * id: "id" + * }) + */ + public insightControllerRun( + request: Vapi.InsightRunDto, + requestOptions?: InsightClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__insightControllerRun(request, requestOptions)); + } + + private async __insightControllerRun( + request: Vapi.InsightRunDto, + requestOptions?: InsightClient.RequestOptions, + ): Promise> { + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + `reporting/insight/${core.url.encodePathParam(id)}/run`, + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.InsightRunResponse, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling POST /reporting/insight/{id}/run."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.InsightControllerPreviewRequest} request + * @param {InsightClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.insight.insightControllerPreview({ + * type: "bar", + * queries: [{ + * type: "vapiql-json", + * table: "call", + * column: "id", + * operation: "count" + * }] + * }) + */ + public insightControllerPreview( + request: Vapi.InsightControllerPreviewRequest, + requestOptions?: InsightClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__insightControllerPreview(request, requestOptions)); + } + + private async __insightControllerPreview( + request: Vapi.InsightControllerPreviewRequest, + requestOptions?: InsightClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + "reporting/insight/preview", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.InsightRunResponse, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling POST /reporting/insight/preview."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.token)}`; + } +} diff --git a/src/api/resources/insight/client/index.ts b/src/api/resources/insight/client/index.ts new file mode 100644 index 00000000..195f9aa8 --- /dev/null +++ b/src/api/resources/insight/client/index.ts @@ -0,0 +1 @@ +export * from "./requests/index.js"; diff --git a/src/api/resources/squads/client/requests/SquadsListRequest.ts b/src/api/resources/insight/client/requests/InsightControllerFindAllRequest.ts similarity index 51% rename from src/api/resources/squads/client/requests/SquadsListRequest.ts rename to src/api/resources/insight/client/requests/InsightControllerFindAllRequest.ts index 407b2e29..3eb61b48 100644 --- a/src/api/resources/squads/client/requests/SquadsListRequest.ts +++ b/src/api/resources/insight/client/requests/InsightControllerFindAllRequest.ts @@ -1,38 +1,33 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; /** * @example - * { - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ -export interface SquadsListRequest { +export interface InsightControllerFindAllRequest { + id?: string; + /** This is the page number to return. Defaults to 1. */ + page?: number; + /** This is the sort order for pagination. Defaults to 'DESC'. */ + sortOrder?: Vapi.InsightControllerFindAllRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/insight/client/requests/InsightControllerFindOneRequest.ts b/src/api/resources/insight/client/requests/InsightControllerFindOneRequest.ts new file mode 100644 index 00000000..e4566452 --- /dev/null +++ b/src/api/resources/insight/client/requests/InsightControllerFindOneRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface InsightControllerFindOneRequest { + id: string; +} diff --git a/src/api/resources/insight/client/requests/InsightControllerRemoveRequest.ts b/src/api/resources/insight/client/requests/InsightControllerRemoveRequest.ts new file mode 100644 index 00000000..c12e5706 --- /dev/null +++ b/src/api/resources/insight/client/requests/InsightControllerRemoveRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface InsightControllerRemoveRequest { + id: string; +} diff --git a/src/api/resources/insight/client/requests/InsightControllerUpdateRequest.ts b/src/api/resources/insight/client/requests/InsightControllerUpdateRequest.ts new file mode 100644 index 00000000..82e784b3 --- /dev/null +++ b/src/api/resources/insight/client/requests/InsightControllerUpdateRequest.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * id: "id", + * body: { + * type: "bar" + * } + * } + */ +export interface InsightControllerUpdateRequest { + id: string; + body: Vapi.InsightControllerUpdateRequestBody; +} diff --git a/src/api/resources/insight/client/requests/InsightRunDto.ts b/src/api/resources/insight/client/requests/InsightRunDto.ts new file mode 100644 index 00000000..6693ba33 --- /dev/null +++ b/src/api/resources/insight/client/requests/InsightRunDto.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * id: "id" + * } + */ +export interface InsightRunDto { + id: string; + formatPlan?: Vapi.InsightRunFormatPlan; + /** + * 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. + */ + timeRangeOverride?: Vapi.InsightTimeRangeWithStep; +} diff --git a/src/api/resources/insight/client/requests/index.ts b/src/api/resources/insight/client/requests/index.ts new file mode 100644 index 00000000..59d94e1c --- /dev/null +++ b/src/api/resources/insight/client/requests/index.ts @@ -0,0 +1,5 @@ +export type { InsightControllerFindAllRequest } from "./InsightControllerFindAllRequest.js"; +export type { InsightControllerFindOneRequest } from "./InsightControllerFindOneRequest.js"; +export type { InsightControllerRemoveRequest } from "./InsightControllerRemoveRequest.js"; +export type { InsightControllerUpdateRequest } from "./InsightControllerUpdateRequest.js"; +export type { InsightRunDto } from "./InsightRunDto.js"; diff --git a/src/api/resources/insight/index.ts b/src/api/resources/insight/index.ts new file mode 100644 index 00000000..d9adb1af --- /dev/null +++ b/src/api/resources/insight/index.ts @@ -0,0 +1,2 @@ +export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/insight/types/InsightControllerCreateRequest.ts b/src/api/resources/insight/types/InsightControllerCreateRequest.ts new file mode 100644 index 00000000..cf126ebc --- /dev/null +++ b/src/api/resources/insight/types/InsightControllerCreateRequest.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type InsightControllerCreateRequest = + | Vapi.CreateBarInsightFromCallTableDto + | Vapi.CreatePieInsightFromCallTableDto + | Vapi.CreateLineInsightFromCallTableDto + | Vapi.CreateTextInsightFromCallTableDto; diff --git a/src/api/resources/insight/types/InsightControllerCreateResponse.ts b/src/api/resources/insight/types/InsightControllerCreateResponse.ts new file mode 100644 index 00000000..576f609f --- /dev/null +++ b/src/api/resources/insight/types/InsightControllerCreateResponse.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type InsightControllerCreateResponse = Vapi.BarInsight | Vapi.PieInsight | Vapi.LineInsight | Vapi.TextInsight; diff --git a/src/api/resources/insight/types/InsightControllerFindAllRequestSortOrder.ts b/src/api/resources/insight/types/InsightControllerFindAllRequestSortOrder.ts new file mode 100644 index 00000000..78e90fb0 --- /dev/null +++ b/src/api/resources/insight/types/InsightControllerFindAllRequestSortOrder.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const InsightControllerFindAllRequestSortOrder = { + Asc: "ASC", + Desc: "DESC", +} as const; +export type InsightControllerFindAllRequestSortOrder = + (typeof InsightControllerFindAllRequestSortOrder)[keyof typeof InsightControllerFindAllRequestSortOrder]; diff --git a/src/api/resources/insight/types/InsightControllerFindOneResponse.ts b/src/api/resources/insight/types/InsightControllerFindOneResponse.ts new file mode 100644 index 00000000..3c5ba838 --- /dev/null +++ b/src/api/resources/insight/types/InsightControllerFindOneResponse.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type InsightControllerFindOneResponse = Vapi.BarInsight | Vapi.PieInsight | Vapi.LineInsight | Vapi.TextInsight; diff --git a/src/api/resources/insight/types/InsightControllerPreviewRequest.ts b/src/api/resources/insight/types/InsightControllerPreviewRequest.ts new file mode 100644 index 00000000..1bc5a573 --- /dev/null +++ b/src/api/resources/insight/types/InsightControllerPreviewRequest.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type InsightControllerPreviewRequest = + | Vapi.CreateBarInsightFromCallTableDto + | Vapi.CreatePieInsightFromCallTableDto + | Vapi.CreateLineInsightFromCallTableDto + | Vapi.CreateTextInsightFromCallTableDto; diff --git a/src/api/resources/insight/types/InsightControllerRemoveResponse.ts b/src/api/resources/insight/types/InsightControllerRemoveResponse.ts new file mode 100644 index 00000000..fc69ec92 --- /dev/null +++ b/src/api/resources/insight/types/InsightControllerRemoveResponse.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type InsightControllerRemoveResponse = Vapi.BarInsight | Vapi.PieInsight | Vapi.LineInsight | Vapi.TextInsight; diff --git a/src/api/resources/insight/types/InsightControllerUpdateRequestBody.ts b/src/api/resources/insight/types/InsightControllerUpdateRequestBody.ts new file mode 100644 index 00000000..e6f2a4cf --- /dev/null +++ b/src/api/resources/insight/types/InsightControllerUpdateRequestBody.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type InsightControllerUpdateRequestBody = + | Vapi.UpdateBarInsightFromCallTableDto + | Vapi.UpdatePieInsightFromCallTableDto + | Vapi.UpdateLineInsightFromCallTableDto + | Vapi.UpdateTextInsightFromCallTableDto; diff --git a/src/api/resources/insight/types/InsightControllerUpdateResponse.ts b/src/api/resources/insight/types/InsightControllerUpdateResponse.ts new file mode 100644 index 00000000..d42f6384 --- /dev/null +++ b/src/api/resources/insight/types/InsightControllerUpdateResponse.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type InsightControllerUpdateResponse = Vapi.BarInsight | Vapi.PieInsight | Vapi.LineInsight | Vapi.TextInsight; diff --git a/src/api/resources/insight/types/index.ts b/src/api/resources/insight/types/index.ts new file mode 100644 index 00000000..384a5641 --- /dev/null +++ b/src/api/resources/insight/types/index.ts @@ -0,0 +1,8 @@ +export * from "./InsightControllerCreateRequest.js"; +export * from "./InsightControllerCreateResponse.js"; +export * from "./InsightControllerFindAllRequestSortOrder.js"; +export * from "./InsightControllerFindOneResponse.js"; +export * from "./InsightControllerPreviewRequest.js"; +export * from "./InsightControllerRemoveResponse.js"; +export * from "./InsightControllerUpdateRequestBody.js"; +export * from "./InsightControllerUpdateResponse.js"; diff --git a/src/api/resources/observabilityScorecard/client/Client.ts b/src/api/resources/observabilityScorecard/client/Client.ts new file mode 100644 index 00000000..ce40ecd9 --- /dev/null +++ b/src/api/resources/observabilityScorecard/client/Client.ts @@ -0,0 +1,454 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; +import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; + +export declare namespace ObservabilityScorecardClient { + export interface Options extends BaseClientOptions {} + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class ObservabilityScorecardClient { + protected readonly _options: ObservabilityScorecardClient.Options; + + constructor(options: ObservabilityScorecardClient.Options) { + this._options = normalizeClientOptions(options); + } + + /** + * @param {Vapi.ScorecardControllerGetRequest} request + * @param {ObservabilityScorecardClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.observabilityScorecard.scorecardControllerGet({ + * id: "id" + * }) + */ + public scorecardControllerGet( + request: Vapi.ScorecardControllerGetRequest, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__scorecardControllerGet(request, requestOptions)); + } + + private async __scorecardControllerGet( + request: Vapi.ScorecardControllerGetRequest, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + `observability/scorecard/${core.url.encodePathParam(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.Scorecard, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling GET /observability/scorecard/{id}."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.ScorecardControllerRemoveRequest} request + * @param {ObservabilityScorecardClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.observabilityScorecard.scorecardControllerRemove({ + * id: "id" + * }) + */ + public scorecardControllerRemove( + request: Vapi.ScorecardControllerRemoveRequest, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__scorecardControllerRemove(request, requestOptions)); + } + + private async __scorecardControllerRemove( + request: Vapi.ScorecardControllerRemoveRequest, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + `observability/scorecard/${core.url.encodePathParam(id)}`, + ), + method: "DELETE", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.Scorecard, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError( + "Timeout exceeded when calling DELETE /observability/scorecard/{id}.", + ); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.UpdateScorecardDto} request + * @param {ObservabilityScorecardClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.observabilityScorecard.scorecardControllerUpdate({ + * id: "id" + * }) + */ + public scorecardControllerUpdate( + request: Vapi.UpdateScorecardDto, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__scorecardControllerUpdate(request, requestOptions)); + } + + private async __scorecardControllerUpdate( + request: Vapi.UpdateScorecardDto, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): Promise> { + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + `observability/scorecard/${core.url.encodePathParam(id)}`, + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.Scorecard, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling PATCH /observability/scorecard/{id}."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.ScorecardControllerGetPaginatedRequest} request + * @param {ObservabilityScorecardClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.observabilityScorecard.scorecardControllerGetPaginated() + */ + public scorecardControllerGetPaginated( + request: Vapi.ScorecardControllerGetPaginatedRequest = {}, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__scorecardControllerGetPaginated(request, requestOptions)); + } + + private async __scorecardControllerGetPaginated( + request: Vapi.ScorecardControllerGetPaginatedRequest = {}, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): Promise> { + const { + id, + page, + sortOrder, + limit, + createdAtGt, + createdAtLt, + createdAtGe, + createdAtLe, + updatedAtGt, + updatedAtLt, + updatedAtGe, + updatedAtLe, + } = request; + const _queryParams: Record = {}; + if (id != null) { + _queryParams.id = id; + } + + if (page != null) { + _queryParams.page = page.toString(); + } + + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; + } + + if (limit != null) { + _queryParams.limit = limit.toString(); + } + + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; + } + + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; + } + + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; + } + + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; + } + + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; + } + + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; + } + + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; + } + + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; + } + + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + "observability/scorecard", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.ScorecardPaginatedResponse, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling GET /observability/scorecard."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * @param {Vapi.CreateScorecardDto} request + * @param {ObservabilityScorecardClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.observabilityScorecard.scorecardControllerCreate({ + * metrics: [{ + * structuredOutputId: "structuredOutputId", + * conditions: [{ + * "key": "value" + * }] + * }] + * }) + */ + public scorecardControllerCreate( + request: Vapi.CreateScorecardDto, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__scorecardControllerCreate(request, requestOptions)); + } + + private async __scorecardControllerCreate( + request: Vapi.CreateScorecardDto, + requestOptions?: ObservabilityScorecardClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + "observability/scorecard", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.Scorecard, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling POST /observability/scorecard."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.token)}`; + } +} diff --git a/src/api/resources/observabilityScorecard/client/index.ts b/src/api/resources/observabilityScorecard/client/index.ts new file mode 100644 index 00000000..195f9aa8 --- /dev/null +++ b/src/api/resources/observabilityScorecard/client/index.ts @@ -0,0 +1 @@ +export * from "./requests/index.js"; diff --git a/src/api/resources/assistants/client/requests/AssistantsListRequest.ts b/src/api/resources/observabilityScorecard/client/requests/ScorecardControllerGetPaginatedRequest.ts similarity index 51% rename from src/api/resources/assistants/client/requests/AssistantsListRequest.ts rename to src/api/resources/observabilityScorecard/client/requests/ScorecardControllerGetPaginatedRequest.ts index d353abe5..f9b28ea9 100644 --- a/src/api/resources/assistants/client/requests/AssistantsListRequest.ts +++ b/src/api/resources/observabilityScorecard/client/requests/ScorecardControllerGetPaginatedRequest.ts @@ -1,38 +1,33 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; /** * @example - * { - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ -export interface AssistantsListRequest { +export interface ScorecardControllerGetPaginatedRequest { + id?: string; + /** This is the page number to return. Defaults to 1. */ + page?: number; + /** This is the sort order for pagination. Defaults to 'DESC'. */ + sortOrder?: Vapi.ScorecardControllerGetPaginatedRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/observabilityScorecard/client/requests/ScorecardControllerGetRequest.ts b/src/api/resources/observabilityScorecard/client/requests/ScorecardControllerGetRequest.ts new file mode 100644 index 00000000..8b9f3fd9 --- /dev/null +++ b/src/api/resources/observabilityScorecard/client/requests/ScorecardControllerGetRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface ScorecardControllerGetRequest { + id: string; +} diff --git a/src/api/resources/observabilityScorecard/client/requests/ScorecardControllerRemoveRequest.ts b/src/api/resources/observabilityScorecard/client/requests/ScorecardControllerRemoveRequest.ts new file mode 100644 index 00000000..f55d5222 --- /dev/null +++ b/src/api/resources/observabilityScorecard/client/requests/ScorecardControllerRemoveRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface ScorecardControllerRemoveRequest { + id: string; +} diff --git a/src/api/resources/observabilityScorecard/client/requests/UpdateScorecardDto.ts b/src/api/resources/observabilityScorecard/client/requests/UpdateScorecardDto.ts new file mode 100644 index 00000000..f54637cd --- /dev/null +++ b/src/api/resources/observabilityScorecard/client/requests/UpdateScorecardDto.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * id: "id" + * } + */ +export interface UpdateScorecardDto { + id: string; + /** This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. */ + name?: string; + /** This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. */ + description?: string; + /** + * 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. + */ + metrics?: Vapi.ScorecardMetric[]; + /** + * 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. + */ + assistantIds?: string[]; +} diff --git a/src/api/resources/observabilityScorecard/client/requests/index.ts b/src/api/resources/observabilityScorecard/client/requests/index.ts new file mode 100644 index 00000000..db18f558 --- /dev/null +++ b/src/api/resources/observabilityScorecard/client/requests/index.ts @@ -0,0 +1,4 @@ +export type { ScorecardControllerGetPaginatedRequest } from "./ScorecardControllerGetPaginatedRequest.js"; +export type { ScorecardControllerGetRequest } from "./ScorecardControllerGetRequest.js"; +export type { ScorecardControllerRemoveRequest } from "./ScorecardControllerRemoveRequest.js"; +export type { UpdateScorecardDto } from "./UpdateScorecardDto.js"; diff --git a/src/api/resources/observabilityScorecard/index.ts b/src/api/resources/observabilityScorecard/index.ts new file mode 100644 index 00000000..d9adb1af --- /dev/null +++ b/src/api/resources/observabilityScorecard/index.ts @@ -0,0 +1,2 @@ +export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/observabilityScorecard/types/ScorecardControllerGetPaginatedRequestSortOrder.ts b/src/api/resources/observabilityScorecard/types/ScorecardControllerGetPaginatedRequestSortOrder.ts new file mode 100644 index 00000000..f3c5f501 --- /dev/null +++ b/src/api/resources/observabilityScorecard/types/ScorecardControllerGetPaginatedRequestSortOrder.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ScorecardControllerGetPaginatedRequestSortOrder = { + Asc: "ASC", + Desc: "DESC", +} as const; +export type ScorecardControllerGetPaginatedRequestSortOrder = + (typeof ScorecardControllerGetPaginatedRequestSortOrder)[keyof typeof ScorecardControllerGetPaginatedRequestSortOrder]; diff --git a/src/api/resources/observabilityScorecard/types/index.ts b/src/api/resources/observabilityScorecard/types/index.ts new file mode 100644 index 00000000..9d265e2b --- /dev/null +++ b/src/api/resources/observabilityScorecard/types/index.ts @@ -0,0 +1 @@ +export * from "./ScorecardControllerGetPaginatedRequestSortOrder.js"; diff --git a/src/api/resources/phoneNumbers/client/Client.ts b/src/api/resources/phoneNumbers/client/Client.ts index ac4e1c22..e27ece33 100644 --- a/src/api/resources/phoneNumbers/client/Client.ts +++ b/src/api/resources/phoneNumbers/client/Client.ts @@ -1,73 +1,44 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace PhoneNumbers { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace PhoneNumbersClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class PhoneNumbers { - protected readonly _options: PhoneNumbers.Options; +export class PhoneNumbersClient { + protected readonly _options: PhoneNumbersClient.Options; - constructor(_options: PhoneNumbers.Options) { - this._options = _options; + constructor(options: PhoneNumbersClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {Vapi.PhoneNumbersListRequest} request - * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ListPhoneNumbersRequest} request + * @param {PhoneNumbersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.phoneNumbers.list({ - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.phoneNumbers.list() */ public list( - request: Vapi.PhoneNumbersListRequest = {}, - requestOptions?: PhoneNumbers.RequestOptions, - ): core.HttpResponsePromise { + request: Vapi.ListPhoneNumbersRequest = {}, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); } private async __list( - request: Vapi.PhoneNumbersListRequest = {}, - requestOptions?: PhoneNumbers.RequestOptions, - ): Promise> { + request: Vapi.ListPhoneNumbersRequest = {}, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): Promise> { const { limit, createdAtGt, @@ -80,43 +51,43 @@ export class PhoneNumbers { updatedAtLe, } = request; const _queryParams: Record = {}; - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -131,12 +102,14 @@ export class PhoneNumbers { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.PhoneNumbersListResponseItem[], rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.ListPhoneNumbersResponseItem[], rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -165,8 +138,8 @@ export class PhoneNumbers { } /** - * @param {Vapi.PhoneNumbersCreateRequest} request - * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.CreatePhoneNumbersRequest} request + * @param {PhoneNumbersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.phoneNumbers.create({ @@ -175,17 +148,17 @@ export class PhoneNumbers { * }) */ public create( - request: Vapi.PhoneNumbersCreateRequest, - requestOptions?: PhoneNumbers.RequestOptions, - ): core.HttpResponsePromise { + request: Vapi.CreatePhoneNumbersRequest, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( - request: Vapi.PhoneNumbersCreateRequest, - requestOptions?: PhoneNumbers.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + request: Vapi.CreatePhoneNumbersRequest, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -203,12 +176,14 @@ export class PhoneNumbers { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.PhoneNumbersCreateResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.CreatePhoneNumbersResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -238,27 +213,14 @@ export class PhoneNumbers { /** * @param {Vapi.PhoneNumberControllerFindAllPaginatedRequest} request - * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * @param {PhoneNumbersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.phoneNumbers.phoneNumberControllerFindAllPaginated({ - * search: "search", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.phoneNumbers.phoneNumberControllerFindAllPaginated() */ public phoneNumberControllerFindAllPaginated( request: Vapi.PhoneNumberControllerFindAllPaginatedRequest = {}, - requestOptions?: PhoneNumbers.RequestOptions, + requestOptions?: PhoneNumbersClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise( this.__phoneNumberControllerFindAllPaginated(request, requestOptions), @@ -267,7 +229,7 @@ export class PhoneNumbers { private async __phoneNumberControllerFindAllPaginated( request: Vapi.PhoneNumberControllerFindAllPaginatedRequest = {}, - requestOptions?: PhoneNumbers.RequestOptions, + requestOptions?: PhoneNumbersClient.RequestOptions, ): Promise> { const { search, @@ -284,55 +246,55 @@ export class PhoneNumbers { updatedAtLe, } = request; const _queryParams: Record = {}; - if (search !== undefined) { - _queryParams["search"] = search; + if (search != null) { + _queryParams.search = search; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (page != null) { + _queryParams.page = page.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -347,9 +309,11 @@ export class PhoneNumbers { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.PhoneNumberPaginatedResponse, rawResponse: _response.rawResponse }; @@ -381,24 +345,27 @@ export class PhoneNumbers { } /** - * @param {string} id - * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.GetPhoneNumbersRequest} request + * @param {PhoneNumbersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.phoneNumbers.get("id") + * await client.phoneNumbers.get({ + * id: "id" + * }) */ public get( - id: string, - requestOptions?: PhoneNumbers.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + request: Vapi.GetPhoneNumbersRequest, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } private async __get( - id: string, - requestOptions?: PhoneNumbers.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + request: Vapi.GetPhoneNumbersRequest, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -408,17 +375,19 @@ export class PhoneNumbers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `phone-number/${encodeURIComponent(id)}`, + `phone-number/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.PhoneNumbersGetResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.GetPhoneNumbersResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -447,24 +416,27 @@ export class PhoneNumbers { } /** - * @param {string} id - * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.DeletePhoneNumbersRequest} request + * @param {PhoneNumbersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.phoneNumbers.delete("id") + * await client.phoneNumbers.delete({ + * id: "id" + * }) */ public delete( - id: string, - requestOptions?: PhoneNumbers.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + request: Vapi.DeletePhoneNumbersRequest, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions)); } private async __delete( - id: string, - requestOptions?: PhoneNumbers.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + request: Vapi.DeletePhoneNumbersRequest, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -474,17 +446,19 @@ export class PhoneNumbers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `phone-number/${encodeURIComponent(id)}`, + `phone-number/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.PhoneNumbersDeleteResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.DeletePhoneNumbersResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -513,27 +487,28 @@ export class PhoneNumbers { } /** - * @param {string} id - * @param {Vapi.PhoneNumbersUpdateRequest} request - * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.UpdatePhoneNumbersRequest} request + * @param {PhoneNumbersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.phoneNumbers.update("id", {}) + * await client.phoneNumbers.update({ + * id: "id", + * body: {} + * }) */ public update( - id: string, - request: Vapi.PhoneNumbersUpdateRequest, - requestOptions?: PhoneNumbers.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + request: Vapi.UpdatePhoneNumbersRequest, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); } private async __update( - id: string, - request: Vapi.PhoneNumbersUpdateRequest, - requestOptions?: PhoneNumbers.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + request: Vapi.UpdatePhoneNumbersRequest, + requestOptions?: PhoneNumbersClient.RequestOptions, + ): Promise> { + const { id, body: _body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -543,20 +518,22 @@ export class PhoneNumbers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `phone-number/${encodeURIComponent(id)}`, + `phone-number/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.PhoneNumbersUpdateResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.UpdatePhoneNumbersResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/phoneNumbers/client/index.ts b/src/api/resources/phoneNumbers/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/phoneNumbers/client/index.ts +++ b/src/api/resources/phoneNumbers/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.ts b/src/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.ts new file mode 100644 index 00000000..28f1cb3d --- /dev/null +++ b/src/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface DeletePhoneNumbersRequest { + id: string; +} diff --git a/src/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.ts b/src/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.ts new file mode 100644 index 00000000..54aa372e --- /dev/null +++ b/src/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface GetPhoneNumbersRequest { + id: string; +} diff --git a/src/api/resources/phoneNumbers/client/requests/PhoneNumbersListRequest.ts b/src/api/resources/phoneNumbers/client/requests/ListPhoneNumbersRequest.ts similarity index 50% rename from src/api/resources/phoneNumbers/client/requests/PhoneNumbersListRequest.ts rename to src/api/resources/phoneNumbers/client/requests/ListPhoneNumbersRequest.ts index 0eca2209..f2acbd92 100644 --- a/src/api/resources/phoneNumbers/client/requests/PhoneNumbersListRequest.ts +++ b/src/api/resources/phoneNumbers/client/requests/ListPhoneNumbersRequest.ts @@ -1,38 +1,26 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * @example - * { - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ -export interface PhoneNumbersListRequest { +export interface ListPhoneNumbersRequest { /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/phoneNumbers/client/requests/PhoneNumberControllerFindAllPaginatedRequest.ts b/src/api/resources/phoneNumbers/client/requests/PhoneNumberControllerFindAllPaginatedRequest.ts index 2b800dbc..d109552c 100644 --- a/src/api/resources/phoneNumbers/client/requests/PhoneNumberControllerFindAllPaginatedRequest.ts +++ b/src/api/resources/phoneNumbers/client/requests/PhoneNumberControllerFindAllPaginatedRequest.ts @@ -1,49 +1,34 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * { - * search: "search", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ export interface PhoneNumberControllerFindAllPaginatedRequest { /** This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive). */ - search?: string | null; + search?: string; /** This is the page number to return. Defaults to 1. */ - page?: number | null; + page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.PhoneNumberControllerFindAllPaginatedRequestSortOrder | null; + sortOrder?: Vapi.PhoneNumberControllerFindAllPaginatedRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.ts b/src/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.ts new file mode 100644 index 00000000..b09ff835 --- /dev/null +++ b/src/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * id: "id", + * body: {} + * } + */ +export interface UpdatePhoneNumbersRequest { + id: string; + body: Vapi.UpdatePhoneNumbersRequestBody; +} diff --git a/src/api/resources/phoneNumbers/client/requests/index.ts b/src/api/resources/phoneNumbers/client/requests/index.ts index e610ac8f..6c410b38 100644 --- a/src/api/resources/phoneNumbers/client/requests/index.ts +++ b/src/api/resources/phoneNumbers/client/requests/index.ts @@ -1,2 +1,5 @@ -export { type PhoneNumbersListRequest } from "./PhoneNumbersListRequest.js"; -export { type PhoneNumberControllerFindAllPaginatedRequest } from "./PhoneNumberControllerFindAllPaginatedRequest.js"; +export type { DeletePhoneNumbersRequest } from "./DeletePhoneNumbersRequest.js"; +export type { GetPhoneNumbersRequest } from "./GetPhoneNumbersRequest.js"; +export type { ListPhoneNumbersRequest } from "./ListPhoneNumbersRequest.js"; +export type { PhoneNumberControllerFindAllPaginatedRequest } from "./PhoneNumberControllerFindAllPaginatedRequest.js"; +export type { UpdatePhoneNumbersRequest } from "./UpdatePhoneNumbersRequest.js"; diff --git a/src/api/resources/phoneNumbers/index.ts b/src/api/resources/phoneNumbers/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/phoneNumbers/index.ts +++ b/src/api/resources/phoneNumbers/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/phoneNumbers/types/PhoneNumbersCreateRequest.ts b/src/api/resources/phoneNumbers/types/CreatePhoneNumbersRequest.ts similarity index 54% rename from src/api/resources/phoneNumbers/types/PhoneNumbersCreateRequest.ts rename to src/api/resources/phoneNumbers/types/CreatePhoneNumbersRequest.ts index 401953df..df9ebfef 100644 --- a/src/api/resources/phoneNumbers/types/PhoneNumbersCreateRequest.ts +++ b/src/api/resources/phoneNumbers/types/CreatePhoneNumbersRequest.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type PhoneNumbersCreateRequest = +export type CreatePhoneNumbersRequest = | Vapi.CreateByoPhoneNumberDto | Vapi.CreateTwilioPhoneNumberDto | Vapi.CreateVonagePhoneNumberDto diff --git a/src/api/resources/phoneNumbers/types/CreatePhoneNumbersResponse.ts b/src/api/resources/phoneNumbers/types/CreatePhoneNumbersResponse.ts new file mode 100644 index 00000000..52fb9162 --- /dev/null +++ b/src/api/resources/phoneNumbers/types/CreatePhoneNumbersResponse.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type CreatePhoneNumbersResponse = + | Vapi.ByoPhoneNumber + | Vapi.TwilioPhoneNumber + | Vapi.VonagePhoneNumber + | Vapi.VapiPhoneNumber + | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/DeletePhoneNumbersResponse.ts b/src/api/resources/phoneNumbers/types/DeletePhoneNumbersResponse.ts new file mode 100644 index 00000000..d2fcfe3d --- /dev/null +++ b/src/api/resources/phoneNumbers/types/DeletePhoneNumbersResponse.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type DeletePhoneNumbersResponse = + | Vapi.ByoPhoneNumber + | Vapi.TwilioPhoneNumber + | Vapi.VonagePhoneNumber + | Vapi.VapiPhoneNumber + | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.ts b/src/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.ts new file mode 100644 index 00000000..ed2aba3b --- /dev/null +++ b/src/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type GetPhoneNumbersResponse = + | Vapi.ByoPhoneNumber + | Vapi.TwilioPhoneNumber + | Vapi.VonagePhoneNumber + | Vapi.VapiPhoneNumber + | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.ts b/src/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.ts new file mode 100644 index 00000000..7f7c6842 --- /dev/null +++ b/src/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type ListPhoneNumbersResponseItem = + | Vapi.ByoPhoneNumber + | Vapi.TwilioPhoneNumber + | Vapi.VonagePhoneNumber + | Vapi.VapiPhoneNumber + | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/PhoneNumberControllerFindAllPaginatedRequestSortOrder.ts b/src/api/resources/phoneNumbers/types/PhoneNumberControllerFindAllPaginatedRequestSortOrder.ts index 4af7a33d..8fa7c366 100644 --- a/src/api/resources/phoneNumbers/types/PhoneNumberControllerFindAllPaginatedRequestSortOrder.ts +++ b/src/api/resources/phoneNumbers/types/PhoneNumberControllerFindAllPaginatedRequestSortOrder.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type PhoneNumberControllerFindAllPaginatedRequestSortOrder = "ASC" | "DESC"; export const PhoneNumberControllerFindAllPaginatedRequestSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type PhoneNumberControllerFindAllPaginatedRequestSortOrder = + (typeof PhoneNumberControllerFindAllPaginatedRequestSortOrder)[keyof typeof PhoneNumberControllerFindAllPaginatedRequestSortOrder]; diff --git a/src/api/resources/phoneNumbers/types/PhoneNumbersCreateResponse.ts b/src/api/resources/phoneNumbers/types/PhoneNumbersCreateResponse.ts deleted file mode 100644 index 87a5c1c6..00000000 --- a/src/api/resources/phoneNumbers/types/PhoneNumbersCreateResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type PhoneNumbersCreateResponse = - | Vapi.ByoPhoneNumber - | Vapi.TwilioPhoneNumber - | Vapi.VonagePhoneNumber - | Vapi.VapiPhoneNumber - | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/PhoneNumbersDeleteResponse.ts b/src/api/resources/phoneNumbers/types/PhoneNumbersDeleteResponse.ts deleted file mode 100644 index b721975c..00000000 --- a/src/api/resources/phoneNumbers/types/PhoneNumbersDeleteResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type PhoneNumbersDeleteResponse = - | Vapi.ByoPhoneNumber - | Vapi.TwilioPhoneNumber - | Vapi.VonagePhoneNumber - | Vapi.VapiPhoneNumber - | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/PhoneNumbersGetResponse.ts b/src/api/resources/phoneNumbers/types/PhoneNumbersGetResponse.ts deleted file mode 100644 index 99cc966c..00000000 --- a/src/api/resources/phoneNumbers/types/PhoneNumbersGetResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type PhoneNumbersGetResponse = - | Vapi.ByoPhoneNumber - | Vapi.TwilioPhoneNumber - | Vapi.VonagePhoneNumber - | Vapi.VapiPhoneNumber - | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/PhoneNumbersListResponseItem.ts b/src/api/resources/phoneNumbers/types/PhoneNumbersListResponseItem.ts deleted file mode 100644 index 9da34688..00000000 --- a/src/api/resources/phoneNumbers/types/PhoneNumbersListResponseItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type PhoneNumbersListResponseItem = - | Vapi.ByoPhoneNumber - | Vapi.TwilioPhoneNumber - | Vapi.VonagePhoneNumber - | Vapi.VapiPhoneNumber - | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/PhoneNumbersUpdateResponse.ts b/src/api/resources/phoneNumbers/types/PhoneNumbersUpdateResponse.ts deleted file mode 100644 index c37bab97..00000000 --- a/src/api/resources/phoneNumbers/types/PhoneNumbersUpdateResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type PhoneNumbersUpdateResponse = - | Vapi.ByoPhoneNumber - | Vapi.TwilioPhoneNumber - | Vapi.VonagePhoneNumber - | Vapi.VapiPhoneNumber - | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/PhoneNumbersUpdateRequest.ts b/src/api/resources/phoneNumbers/types/UpdatePhoneNumbersRequestBody.ts similarity index 54% rename from src/api/resources/phoneNumbers/types/PhoneNumbersUpdateRequest.ts rename to src/api/resources/phoneNumbers/types/UpdatePhoneNumbersRequestBody.ts index 73a9400f..cb459627 100644 --- a/src/api/resources/phoneNumbers/types/PhoneNumbersUpdateRequest.ts +++ b/src/api/resources/phoneNumbers/types/UpdatePhoneNumbersRequestBody.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type PhoneNumbersUpdateRequest = +export type UpdatePhoneNumbersRequestBody = | Vapi.UpdateByoPhoneNumberDto | Vapi.UpdateTwilioPhoneNumberDto | Vapi.UpdateVonagePhoneNumberDto diff --git a/src/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.ts b/src/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.ts new file mode 100644 index 00000000..d72b8b42 --- /dev/null +++ b/src/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type UpdatePhoneNumbersResponse = + | Vapi.ByoPhoneNumber + | Vapi.TwilioPhoneNumber + | Vapi.VonagePhoneNumber + | Vapi.VapiPhoneNumber + | Vapi.TelnyxPhoneNumber; diff --git a/src/api/resources/phoneNumbers/types/index.ts b/src/api/resources/phoneNumbers/types/index.ts index d26f35c6..08dded61 100644 --- a/src/api/resources/phoneNumbers/types/index.ts +++ b/src/api/resources/phoneNumbers/types/index.ts @@ -1,8 +1,8 @@ -export * from "./PhoneNumbersListResponseItem.js"; -export * from "./PhoneNumbersCreateRequest.js"; -export * from "./PhoneNumbersCreateResponse.js"; +export * from "./CreatePhoneNumbersRequest.js"; +export * from "./CreatePhoneNumbersResponse.js"; +export * from "./DeletePhoneNumbersResponse.js"; +export * from "./GetPhoneNumbersResponse.js"; +export * from "./ListPhoneNumbersResponseItem.js"; export * from "./PhoneNumberControllerFindAllPaginatedRequestSortOrder.js"; -export * from "./PhoneNumbersGetResponse.js"; -export * from "./PhoneNumbersDeleteResponse.js"; -export * from "./PhoneNumbersUpdateRequest.js"; -export * from "./PhoneNumbersUpdateResponse.js"; +export * from "./UpdatePhoneNumbersRequestBody.js"; +export * from "./UpdatePhoneNumbersResponse.js"; diff --git a/src/api/resources/providerResources/client/Client.ts b/src/api/resources/providerResources/client/Client.ts index 84b20d23..4c2971d4 100644 --- a/src/api/resources/providerResources/client/Client.ts +++ b/src/api/resources/providerResources/client/Client.ts @@ -1,91 +1,52 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import * as Vapi from "../../../index.js"; -export declare namespace ProviderResources { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace ProviderResourcesClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class ProviderResources { - protected readonly _options: ProviderResources.Options; +export class ProviderResourcesClient { + protected readonly _options: ProviderResourcesClient.Options; - constructor(_options: ProviderResources.Options) { - this._options = _options; + constructor(options: ProviderResourcesClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {"11labs"} provider - The provider (e.g., 11labs) - * @param {"pronunciation-dictionary"} resourceName - The resource name (e.g., pronunciation-dictionary) * @param {Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequest} request - * @param {ProviderResources.RequestOptions} requestOptions - Request-specific configuration. + * @param {ProviderResourcesClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.providerResources.providerResourceControllerGetProviderResourcesPaginated("11labs", "pronunciation-dictionary", { - * id: "id", - * resourceId: "resourceId", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" + * await client.providerResources.providerResourceControllerGetProviderResourcesPaginated({ + * provider: "11labs", + * resourceName: "pronunciation-dictionary" * }) */ public providerResourceControllerGetProviderResourcesPaginated( - provider: "11labs", - resourceName: "pronunciation-dictionary", - request: Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequest = {}, - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise( - this.__providerResourceControllerGetProviderResourcesPaginated( - provider, - resourceName, - request, - requestOptions, - ), + this.__providerResourceControllerGetProviderResourcesPaginated(request, requestOptions), ); } private async __providerResourceControllerGetProviderResourcesPaginated( - provider: "11labs", - resourceName: "pronunciation-dictionary", - request: Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequest = {}, - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): Promise> { const { + provider, + resourceName, id, resourceId, page, @@ -101,59 +62,59 @@ export class ProviderResources { updatedAtLe, } = request; const _queryParams: Record = {}; - if (id !== undefined) { - _queryParams["id"] = id; + if (id != null) { + _queryParams.id = id; } - if (resourceId !== undefined) { - _queryParams["resourceId"] = resourceId; + if (resourceId != null) { + _queryParams.resourceId = resourceId; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (page != null) { + _queryParams.page = page.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -163,14 +124,16 @@ export class ProviderResources { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `provider/${encodeURIComponent(provider)}/${encodeURIComponent(resourceName)}`, + `provider/${core.url.encodePathParam(provider)}/${core.url.encodePathParam(resourceName)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { @@ -207,29 +170,30 @@ export class ProviderResources { } /** - * @param {"11labs"} provider - The provider (e.g., 11labs) - * @param {"pronunciation-dictionary"} resourceName - The resource name (e.g., pronunciation-dictionary) - * @param {ProviderResources.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ProviderResourceControllerCreateProviderResourceRequest} request + * @param {ProviderResourcesClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.providerResources.providerResourceControllerCreateProviderResource("11labs", "pronunciation-dictionary") + * await client.providerResources.providerResourceControllerCreateProviderResource({ + * provider: "11labs", + * resourceName: "pronunciation-dictionary" + * }) */ public providerResourceControllerCreateProviderResource( - provider: "11labs", - resourceName: "pronunciation-dictionary", - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerCreateProviderResourceRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise( - this.__providerResourceControllerCreateProviderResource(provider, resourceName, requestOptions), + this.__providerResourceControllerCreateProviderResource(request, requestOptions), ); } private async __providerResourceControllerCreateProviderResource( - provider: "11labs", - resourceName: "pronunciation-dictionary", - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerCreateProviderResourceRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { provider, resourceName } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -239,14 +203,16 @@ export class ProviderResources { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `provider/${encodeURIComponent(provider)}/${encodeURIComponent(resourceName)}`, + `provider/${core.url.encodePathParam(provider)}/${core.url.encodePathParam(resourceName)}`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.ProviderResource, rawResponse: _response.rawResponse }; @@ -280,34 +246,33 @@ export class ProviderResources { } /** - * @param {"11labs"} provider - The provider (e.g., 11labs) - * @param {"pronunciation-dictionary"} resourceName - The resource name (e.g., pronunciation-dictionary) - * @param {string} id - * @param {ProviderResources.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ProviderResourceControllerGetProviderResourceRequest} request + * @param {ProviderResourcesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vapi.NotFoundError} * * @example - * await client.providerResources.providerResourceControllerGetProviderResource("11labs", "pronunciation-dictionary", "id") + * await client.providerResources.providerResourceControllerGetProviderResource({ + * provider: "11labs", + * resourceName: "pronunciation-dictionary", + * id: "id" + * }) */ public providerResourceControllerGetProviderResource( - provider: "11labs", - resourceName: "pronunciation-dictionary", - id: string, - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerGetProviderResourceRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise( - this.__providerResourceControllerGetProviderResource(provider, resourceName, id, requestOptions), + this.__providerResourceControllerGetProviderResource(request, requestOptions), ); } private async __providerResourceControllerGetProviderResource( - provider: "11labs", - resourceName: "pronunciation-dictionary", - id: string, - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerGetProviderResourceRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { provider, resourceName, id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -317,14 +282,16 @@ export class ProviderResources { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `provider/${encodeURIComponent(provider)}/${encodeURIComponent(resourceName)}/${encodeURIComponent(id)}`, + `provider/${core.url.encodePathParam(provider)}/${core.url.encodePathParam(resourceName)}/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.ProviderResource, rawResponse: _response.rawResponse }; @@ -363,34 +330,33 @@ export class ProviderResources { } /** - * @param {"11labs"} provider - The provider (e.g., 11labs) - * @param {"pronunciation-dictionary"} resourceName - The resource name (e.g., pronunciation-dictionary) - * @param {string} id - * @param {ProviderResources.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ProviderResourceControllerDeleteProviderResourceRequest} request + * @param {ProviderResourcesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vapi.NotFoundError} * * @example - * await client.providerResources.providerResourceControllerDeleteProviderResource("11labs", "pronunciation-dictionary", "id") + * await client.providerResources.providerResourceControllerDeleteProviderResource({ + * provider: "11labs", + * resourceName: "pronunciation-dictionary", + * id: "id" + * }) */ public providerResourceControllerDeleteProviderResource( - provider: "11labs", - resourceName: "pronunciation-dictionary", - id: string, - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerDeleteProviderResourceRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise( - this.__providerResourceControllerDeleteProviderResource(provider, resourceName, id, requestOptions), + this.__providerResourceControllerDeleteProviderResource(request, requestOptions), ); } private async __providerResourceControllerDeleteProviderResource( - provider: "11labs", - resourceName: "pronunciation-dictionary", - id: string, - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerDeleteProviderResourceRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { provider, resourceName, id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -400,14 +366,16 @@ export class ProviderResources { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `provider/${encodeURIComponent(provider)}/${encodeURIComponent(resourceName)}/${encodeURIComponent(id)}`, + `provider/${core.url.encodePathParam(provider)}/${core.url.encodePathParam(resourceName)}/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.ProviderResource, rawResponse: _response.rawResponse }; @@ -446,34 +414,33 @@ export class ProviderResources { } /** - * @param {"11labs"} provider - The provider (e.g., 11labs) - * @param {"pronunciation-dictionary"} resourceName - The resource name (e.g., pronunciation-dictionary) - * @param {string} id - * @param {ProviderResources.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ProviderResourceControllerUpdateProviderResourceRequest} request + * @param {ProviderResourcesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vapi.NotFoundError} * * @example - * await client.providerResources.providerResourceControllerUpdateProviderResource("11labs", "pronunciation-dictionary", "id") + * await client.providerResources.providerResourceControllerUpdateProviderResource({ + * provider: "11labs", + * resourceName: "pronunciation-dictionary", + * id: "id" + * }) */ public providerResourceControllerUpdateProviderResource( - provider: "11labs", - resourceName: "pronunciation-dictionary", - id: string, - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerUpdateProviderResourceRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise( - this.__providerResourceControllerUpdateProviderResource(provider, resourceName, id, requestOptions), + this.__providerResourceControllerUpdateProviderResource(request, requestOptions), ); } private async __providerResourceControllerUpdateProviderResource( - provider: "11labs", - resourceName: "pronunciation-dictionary", - id: string, - requestOptions?: ProviderResources.RequestOptions, + request: Vapi.ProviderResourceControllerUpdateProviderResourceRequest, + requestOptions?: ProviderResourcesClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { provider, resourceName, id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -483,14 +450,16 @@ export class ProviderResources { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `provider/${encodeURIComponent(provider)}/${encodeURIComponent(resourceName)}/${encodeURIComponent(id)}`, + `provider/${core.url.encodePathParam(provider)}/${core.url.encodePathParam(resourceName)}/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.ProviderResource, rawResponse: _response.rawResponse }; diff --git a/src/api/resources/providerResources/client/index.ts b/src/api/resources/providerResources/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/providerResources/client/index.ts +++ b/src/api/resources/providerResources/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/providerResources/client/requests/ProviderResourceControllerCreateProviderResourceRequest.ts b/src/api/resources/providerResources/client/requests/ProviderResourceControllerCreateProviderResourceRequest.ts new file mode 100644 index 00000000..77b5b5a0 --- /dev/null +++ b/src/api/resources/providerResources/client/requests/ProviderResourceControllerCreateProviderResourceRequest.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * provider: "11labs", + * resourceName: "pronunciation-dictionary" + * } + */ +export interface ProviderResourceControllerCreateProviderResourceRequest { + /** The provider (e.g., 11labs) */ + provider: Vapi.ProviderResourceControllerCreateProviderResourceRequestProvider; + /** The resource name (e.g., pronunciation-dictionary) */ + resourceName: Vapi.ProviderResourceControllerCreateProviderResourceRequestResourceName; +} diff --git a/src/api/resources/providerResources/client/requests/ProviderResourceControllerDeleteProviderResourceRequest.ts b/src/api/resources/providerResources/client/requests/ProviderResourceControllerDeleteProviderResourceRequest.ts new file mode 100644 index 00000000..fe2d7c70 --- /dev/null +++ b/src/api/resources/providerResources/client/requests/ProviderResourceControllerDeleteProviderResourceRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * provider: "11labs", + * resourceName: "pronunciation-dictionary", + * id: "id" + * } + */ +export interface ProviderResourceControllerDeleteProviderResourceRequest { + /** The provider (e.g., 11labs) */ + provider: Vapi.ProviderResourceControllerDeleteProviderResourceRequestProvider; + /** The resource name (e.g., pronunciation-dictionary) */ + resourceName: Vapi.ProviderResourceControllerDeleteProviderResourceRequestResourceName; + id: string; +} diff --git a/src/api/resources/providerResources/client/requests/ProviderResourceControllerGetProviderResourceRequest.ts b/src/api/resources/providerResources/client/requests/ProviderResourceControllerGetProviderResourceRequest.ts new file mode 100644 index 00000000..ab6e16a4 --- /dev/null +++ b/src/api/resources/providerResources/client/requests/ProviderResourceControllerGetProviderResourceRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * provider: "11labs", + * resourceName: "pronunciation-dictionary", + * id: "id" + * } + */ +export interface ProviderResourceControllerGetProviderResourceRequest { + /** The provider (e.g., 11labs) */ + provider: Vapi.ProviderResourceControllerGetProviderResourceRequestProvider; + /** The resource name (e.g., pronunciation-dictionary) */ + resourceName: Vapi.ProviderResourceControllerGetProviderResourceRequestResourceName; + id: string; +} diff --git a/src/api/resources/providerResources/client/requests/ProviderResourceControllerGetProviderResourcesPaginatedRequest.ts b/src/api/resources/providerResources/client/requests/ProviderResourceControllerGetProviderResourcesPaginatedRequest.ts index 782bc60b..c60fa4d7 100644 --- a/src/api/resources/providerResources/client/requests/ProviderResourceControllerGetProviderResourcesPaginatedRequest.ts +++ b/src/api/resources/providerResources/client/requests/ProviderResourceControllerGetProviderResourcesPaginatedRequest.ts @@ -1,50 +1,41 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example * { - * id: "id", - * resourceId: "resourceId", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" + * provider: "11labs", + * resourceName: "pronunciation-dictionary" * } */ export interface ProviderResourceControllerGetProviderResourcesPaginatedRequest { - id?: string | null; - resourceId?: string | null; + /** The provider (e.g., 11labs) */ + provider: Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider; + /** The resource name (e.g., pronunciation-dictionary) */ + resourceName: Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName; + id?: string; + resourceId?: string; /** This is the page number to return. Defaults to 1. */ - page?: number | null; + page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder | null; + sortOrder?: Vapi.ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/providerResources/client/requests/ProviderResourceControllerUpdateProviderResourceRequest.ts b/src/api/resources/providerResources/client/requests/ProviderResourceControllerUpdateProviderResourceRequest.ts new file mode 100644 index 00000000..56fa513b --- /dev/null +++ b/src/api/resources/providerResources/client/requests/ProviderResourceControllerUpdateProviderResourceRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * provider: "11labs", + * resourceName: "pronunciation-dictionary", + * id: "id" + * } + */ +export interface ProviderResourceControllerUpdateProviderResourceRequest { + /** The provider (e.g., 11labs) */ + provider: Vapi.ProviderResourceControllerUpdateProviderResourceRequestProvider; + /** The resource name (e.g., pronunciation-dictionary) */ + resourceName: Vapi.ProviderResourceControllerUpdateProviderResourceRequestResourceName; + id: string; +} diff --git a/src/api/resources/providerResources/client/requests/index.ts b/src/api/resources/providerResources/client/requests/index.ts index 8f00322e..06e8b299 100644 --- a/src/api/resources/providerResources/client/requests/index.ts +++ b/src/api/resources/providerResources/client/requests/index.ts @@ -1 +1,5 @@ -export { type ProviderResourceControllerGetProviderResourcesPaginatedRequest } from "./ProviderResourceControllerGetProviderResourcesPaginatedRequest.js"; +export type { ProviderResourceControllerCreateProviderResourceRequest } from "./ProviderResourceControllerCreateProviderResourceRequest.js"; +export type { ProviderResourceControllerDeleteProviderResourceRequest } from "./ProviderResourceControllerDeleteProviderResourceRequest.js"; +export type { ProviderResourceControllerGetProviderResourceRequest } from "./ProviderResourceControllerGetProviderResourceRequest.js"; +export type { ProviderResourceControllerGetProviderResourcesPaginatedRequest } from "./ProviderResourceControllerGetProviderResourcesPaginatedRequest.js"; +export type { ProviderResourceControllerUpdateProviderResourceRequest } from "./ProviderResourceControllerUpdateProviderResourceRequest.js"; diff --git a/src/api/resources/providerResources/index.ts b/src/api/resources/providerResources/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/providerResources/index.ts +++ b/src/api/resources/providerResources/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerCreateProviderResourceRequestProvider.ts b/src/api/resources/providerResources/types/ProviderResourceControllerCreateProviderResourceRequestProvider.ts new file mode 100644 index 00000000..4f7884ee --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerCreateProviderResourceRequestProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerCreateProviderResourceRequestProvider = { + ElevenLabs: "11labs", +} as const; +export type ProviderResourceControllerCreateProviderResourceRequestProvider = + (typeof ProviderResourceControllerCreateProviderResourceRequestProvider)[keyof typeof ProviderResourceControllerCreateProviderResourceRequestProvider]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerCreateProviderResourceRequestResourceName.ts b/src/api/resources/providerResources/types/ProviderResourceControllerCreateProviderResourceRequestResourceName.ts new file mode 100644 index 00000000..3a2a6042 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerCreateProviderResourceRequestResourceName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerCreateProviderResourceRequestResourceName = { + PronunciationDictionary: "pronunciation-dictionary", +} as const; +export type ProviderResourceControllerCreateProviderResourceRequestResourceName = + (typeof ProviderResourceControllerCreateProviderResourceRequestResourceName)[keyof typeof ProviderResourceControllerCreateProviderResourceRequestResourceName]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerDeleteProviderResourceRequestProvider.ts b/src/api/resources/providerResources/types/ProviderResourceControllerDeleteProviderResourceRequestProvider.ts new file mode 100644 index 00000000..a5765be8 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerDeleteProviderResourceRequestProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerDeleteProviderResourceRequestProvider = { + ElevenLabs: "11labs", +} as const; +export type ProviderResourceControllerDeleteProviderResourceRequestProvider = + (typeof ProviderResourceControllerDeleteProviderResourceRequestProvider)[keyof typeof ProviderResourceControllerDeleteProviderResourceRequestProvider]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerDeleteProviderResourceRequestResourceName.ts b/src/api/resources/providerResources/types/ProviderResourceControllerDeleteProviderResourceRequestResourceName.ts new file mode 100644 index 00000000..b78e4ef8 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerDeleteProviderResourceRequestResourceName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerDeleteProviderResourceRequestResourceName = { + PronunciationDictionary: "pronunciation-dictionary", +} as const; +export type ProviderResourceControllerDeleteProviderResourceRequestResourceName = + (typeof ProviderResourceControllerDeleteProviderResourceRequestResourceName)[keyof typeof ProviderResourceControllerDeleteProviderResourceRequestResourceName]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourceRequestProvider.ts b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourceRequestProvider.ts new file mode 100644 index 00000000..441fdf23 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourceRequestProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerGetProviderResourceRequestProvider = { + ElevenLabs: "11labs", +} as const; +export type ProviderResourceControllerGetProviderResourceRequestProvider = + (typeof ProviderResourceControllerGetProviderResourceRequestProvider)[keyof typeof ProviderResourceControllerGetProviderResourceRequestProvider]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourceRequestResourceName.ts b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourceRequestResourceName.ts new file mode 100644 index 00000000..c5907d65 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourceRequestResourceName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerGetProviderResourceRequestResourceName = { + PronunciationDictionary: "pronunciation-dictionary", +} as const; +export type ProviderResourceControllerGetProviderResourceRequestResourceName = + (typeof ProviderResourceControllerGetProviderResourceRequestResourceName)[keyof typeof ProviderResourceControllerGetProviderResourceRequestResourceName]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider.ts b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider.ts new file mode 100644 index 00000000..50c92590 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider = { + ElevenLabs: "11labs", +} as const; +export type ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider = + (typeof ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider)[keyof typeof ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName.ts b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName.ts new file mode 100644 index 00000000..e59ed113 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName = { + PronunciationDictionary: "pronunciation-dictionary", +} as const; +export type ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName = + (typeof ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName)[keyof typeof ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder.ts b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder.ts index 27551e8d..1ee141ac 100644 --- a/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder.ts +++ b/src/api/resources/providerResources/types/ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder = "ASC" | "DESC"; export const ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder = + (typeof ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder)[keyof typeof ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerUpdateProviderResourceRequestProvider.ts b/src/api/resources/providerResources/types/ProviderResourceControllerUpdateProviderResourceRequestProvider.ts new file mode 100644 index 00000000..d2fc3035 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerUpdateProviderResourceRequestProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerUpdateProviderResourceRequestProvider = { + ElevenLabs: "11labs", +} as const; +export type ProviderResourceControllerUpdateProviderResourceRequestProvider = + (typeof ProviderResourceControllerUpdateProviderResourceRequestProvider)[keyof typeof ProviderResourceControllerUpdateProviderResourceRequestProvider]; diff --git a/src/api/resources/providerResources/types/ProviderResourceControllerUpdateProviderResourceRequestResourceName.ts b/src/api/resources/providerResources/types/ProviderResourceControllerUpdateProviderResourceRequestResourceName.ts new file mode 100644 index 00000000..5aca27c2 --- /dev/null +++ b/src/api/resources/providerResources/types/ProviderResourceControllerUpdateProviderResourceRequestResourceName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ProviderResourceControllerUpdateProviderResourceRequestResourceName = { + PronunciationDictionary: "pronunciation-dictionary", +} as const; +export type ProviderResourceControllerUpdateProviderResourceRequestResourceName = + (typeof ProviderResourceControllerUpdateProviderResourceRequestResourceName)[keyof typeof ProviderResourceControllerUpdateProviderResourceRequestResourceName]; diff --git a/src/api/resources/providerResources/types/index.ts b/src/api/resources/providerResources/types/index.ts index d386bcdd..0f3af992 100644 --- a/src/api/resources/providerResources/types/index.ts +++ b/src/api/resources/providerResources/types/index.ts @@ -1 +1,11 @@ +export * from "./ProviderResourceControllerCreateProviderResourceRequestProvider.js"; +export * from "./ProviderResourceControllerCreateProviderResourceRequestResourceName.js"; +export * from "./ProviderResourceControllerDeleteProviderResourceRequestProvider.js"; +export * from "./ProviderResourceControllerDeleteProviderResourceRequestResourceName.js"; +export * from "./ProviderResourceControllerGetProviderResourceRequestProvider.js"; +export * from "./ProviderResourceControllerGetProviderResourceRequestResourceName.js"; +export * from "./ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider.js"; +export * from "./ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName.js"; export * from "./ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder.js"; +export * from "./ProviderResourceControllerUpdateProviderResourceRequestProvider.js"; +export * from "./ProviderResourceControllerUpdateProviderResourceRequestResourceName.js"; diff --git a/src/api/resources/sessions/client/Client.ts b/src/api/resources/sessions/client/Client.ts index d6ccbc1c..92fb652a 100644 --- a/src/api/resources/sessions/client/Client.ts +++ b/src/api/resources/sessions/client/Client.ts @@ -1,84 +1,56 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Sessions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace SessionsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Sessions { - protected readonly _options: Sessions.Options; +export class SessionsClient { + protected readonly _options: SessionsClient.Options; - constructor(_options: Sessions.Options) { - this._options = _options; + constructor(options: SessionsClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {Vapi.SessionsListRequest} request - * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ListSessionsRequest} request + * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.sessions.list({ - * name: "name", - * assistantId: "assistantId", - * squadId: "squadId", - * workflowId: "workflowId", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.sessions.list() */ public list( - request: Vapi.SessionsListRequest = {}, - requestOptions?: Sessions.RequestOptions, + request: Vapi.ListSessionsRequest = {}, + requestOptions?: SessionsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); } private async __list( - request: Vapi.SessionsListRequest = {}, - requestOptions?: Sessions.RequestOptions, + request: Vapi.ListSessionsRequest = {}, + requestOptions?: SessionsClient.RequestOptions, ): Promise> { const { name, assistantId, squadId, workflowId, + numberE164CheckEnabled, + extension, + assistantOverrides, + number: number_, + sipUri, + email, + externalId, page, sortOrder, limit, @@ -92,67 +64,95 @@ export class Sessions { updatedAtLe, } = request; const _queryParams: Record = {}; - if (name !== undefined) { - _queryParams["name"] = name; + if (name != null) { + _queryParams.name = name; } - if (assistantId !== undefined) { - _queryParams["assistantId"] = assistantId; + if (assistantId != null) { + _queryParams.assistantId = assistantId; } - if (squadId !== undefined) { - _queryParams["squadId"] = squadId; + if (squadId != null) { + _queryParams.squadId = squadId; } - if (workflowId !== undefined) { - _queryParams["workflowId"] = workflowId; + if (workflowId != null) { + _queryParams.workflowId = workflowId; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (numberE164CheckEnabled != null) { + _queryParams.numberE164CheckEnabled = numberE164CheckEnabled.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (extension != null) { + _queryParams.extension = extension; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (assistantOverrides != null) { + _queryParams.assistantOverrides = assistantOverrides; } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (number_ != null) { + _queryParams.number = number_; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (sipUri != null) { + _queryParams.sipUri = sipUri; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (email != null) { + _queryParams.email = email; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (externalId != null) { + _queryParams.externalId = externalId; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (page != null) { + _queryParams.page = page.toString(); } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; + } + + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; + } + + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; + } + + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; + } + + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; + } + + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; + } + + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; + } + + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -167,9 +167,11 @@ export class Sessions { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.SessionPaginatedResponse, rawResponse: _response.rawResponse }; @@ -202,23 +204,23 @@ export class Sessions { /** * @param {Vapi.CreateSessionDto} request - * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. + * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.sessions.create() */ public create( request: Vapi.CreateSessionDto = {}, - requestOptions?: Sessions.RequestOptions, + requestOptions?: SessionsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( request: Vapi.CreateSessionDto = {}, - requestOptions?: Sessions.RequestOptions, + requestOptions?: SessionsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -236,9 +238,11 @@ export class Sessions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Session, rawResponse: _response.rawResponse }; @@ -270,21 +274,27 @@ export class Sessions { } /** - * @param {string} id - * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.GetSessionsRequest} request + * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.sessions.get("id") + * await client.sessions.get({ + * id: "id" + * }) */ - public get(id: string, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + public get( + request: Vapi.GetSessionsRequest, + requestOptions?: SessionsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } private async __get( - id: string, - requestOptions?: Sessions.RequestOptions, + request: Vapi.GetSessionsRequest, + requestOptions?: SessionsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -294,14 +304,16 @@ export class Sessions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `session/${encodeURIComponent(id)}`, + `session/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Session, rawResponse: _response.rawResponse }; @@ -333,21 +345,27 @@ export class Sessions { } /** - * @param {string} id - * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.DeleteSessionsRequest} request + * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.sessions.delete("id") + * await client.sessions.delete({ + * id: "id" + * }) */ - public delete(id: string, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + public delete( + request: Vapi.DeleteSessionsRequest, + requestOptions?: SessionsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions)); } private async __delete( - id: string, - requestOptions?: Sessions.RequestOptions, + request: Vapi.DeleteSessionsRequest, + requestOptions?: SessionsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -357,14 +375,16 @@ export class Sessions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `session/${encodeURIComponent(id)}`, + `session/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Session, rawResponse: _response.rawResponse }; @@ -396,27 +416,27 @@ export class Sessions { } /** - * @param {string} id * @param {Vapi.UpdateSessionDto} request - * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration. + * @param {SessionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.sessions.update("id") + * await client.sessions.update({ + * id: "id" + * }) */ public update( - id: string, - request: Vapi.UpdateSessionDto = {}, - requestOptions?: Sessions.RequestOptions, + request: Vapi.UpdateSessionDto, + requestOptions?: SessionsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); } private async __update( - id: string, - request: Vapi.UpdateSessionDto = {}, - requestOptions?: Sessions.RequestOptions, + request: Vapi.UpdateSessionDto, + requestOptions?: SessionsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -426,17 +446,19 @@ export class Sessions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `session/${encodeURIComponent(id)}`, + `session/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Session, rawResponse: _response.rawResponse }; diff --git a/src/api/resources/sessions/client/index.ts b/src/api/resources/sessions/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/sessions/client/index.ts +++ b/src/api/resources/sessions/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/sessions/client/requests/CreateSessionDto.ts b/src/api/resources/sessions/client/requests/CreateSessionDto.ts index f11b6ce3..5bd6d2f7 100644 --- a/src/api/resources/sessions/client/requests/CreateSessionDto.ts +++ b/src/api/resources/sessions/client/requests/CreateSessionDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example diff --git a/src/api/resources/sessions/client/requests/DeleteSessionsRequest.ts b/src/api/resources/sessions/client/requests/DeleteSessionsRequest.ts new file mode 100644 index 00000000..9081b962 --- /dev/null +++ b/src/api/resources/sessions/client/requests/DeleteSessionsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface DeleteSessionsRequest { + id: string; +} diff --git a/src/api/resources/sessions/client/requests/GetSessionsRequest.ts b/src/api/resources/sessions/client/requests/GetSessionsRequest.ts new file mode 100644 index 00000000..6f2e9295 --- /dev/null +++ b/src/api/resources/sessions/client/requests/GetSessionsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface GetSessionsRequest { + id: string; +} diff --git a/src/api/resources/sessions/client/requests/ListSessionsRequest.ts b/src/api/resources/sessions/client/requests/ListSessionsRequest.ts new file mode 100644 index 00000000..cdaabf1a --- /dev/null +++ b/src/api/resources/sessions/client/requests/ListSessionsRequest.ts @@ -0,0 +1,71 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * {} + */ +export interface ListSessionsRequest { + /** + * 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" `. + */ + name?: string; + /** This is the ID of the assistant to filter sessions by. */ + assistantId?: string; + /** This is the ID of the squad to filter sessions by. */ + squadId?: string; + /** This is the ID of the workflow to filter sessions by. */ + workflowId?: string; + /** + * 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) + */ + numberE164CheckEnabled?: boolean; + /** This is the extension that will be dialed after the call is answered. */ + extension?: string; + /** + * 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. + */ + assistantOverrides?: string; + /** This is the number of the customer. */ + number?: string; + /** This is the SIP URI of the customer. */ + sipUri?: string; + /** This is the email of the customer. */ + email?: string; + /** This is the external ID of the customer. */ + externalId?: string; + /** This is the page number to return. Defaults to 1. */ + page?: number; + /** This is the sort order for pagination. Defaults to 'DESC'. */ + sortOrder?: Vapi.ListSessionsRequestSortOrder; + /** This is the maximum number of items to return. Defaults to 100. */ + limit?: number; + /** This will return items where the createdAt is greater than the specified value. */ + createdAtGt?: string; + /** This will return items where the createdAt is less than the specified value. */ + createdAtLt?: string; + /** This will return items where the createdAt is greater than or equal to the specified value. */ + createdAtGe?: string; + /** This will return items where the createdAt is less than or equal to the specified value. */ + createdAtLe?: string; + /** This will return items where the updatedAt is greater than the specified value. */ + updatedAtGt?: string; + /** This will return items where the updatedAt is less than the specified value. */ + updatedAtLt?: string; + /** This will return items where the updatedAt is greater than or equal to the specified value. */ + updatedAtGe?: string; + /** This will return items where the updatedAt is less than or equal to the specified value. */ + updatedAtLe?: string; +} diff --git a/src/api/resources/sessions/client/requests/SessionsListRequest.ts b/src/api/resources/sessions/client/requests/SessionsListRequest.ts deleted file mode 100644 index dc39e085..00000000 --- a/src/api/resources/sessions/client/requests/SessionsListRequest.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../../index.js"; - -/** - * @example - * { - * name: "name", - * assistantId: "assistantId", - * squadId: "squadId", - * workflowId: "workflowId", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } - */ -export interface SessionsListRequest { - /** This is the name of the session to filter by. */ - name?: string | null; - /** This is the ID of the assistant to filter sessions by. */ - assistantId?: string | null; - /** This is the ID of the squad to filter sessions by. */ - squadId?: string | null; - /** This is the ID of the workflow to filter sessions by. */ - workflowId?: string | null; - /** This is the page number to return. Defaults to 1. */ - page?: number | null; - /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.SessionsListRequestSortOrder | null; - /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; - /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; - /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; - /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; - /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; - /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; - /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; - /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; - /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; -} diff --git a/src/api/resources/sessions/client/requests/UpdateSessionDto.ts b/src/api/resources/sessions/client/requests/UpdateSessionDto.ts index 7a5121b3..9f3128a3 100644 --- a/src/api/resources/sessions/client/requests/UpdateSessionDto.ts +++ b/src/api/resources/sessions/client/requests/UpdateSessionDto.ts @@ -1,14 +1,15 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * {} + * { + * id: "id" + * } */ export interface UpdateSessionDto { + id: string; /** This is the new name for the session. Maximum length is 40 characters. */ name?: string; /** This is the new status for the session. */ diff --git a/src/api/resources/sessions/client/requests/index.ts b/src/api/resources/sessions/client/requests/index.ts index d9b7aadb..e614144c 100644 --- a/src/api/resources/sessions/client/requests/index.ts +++ b/src/api/resources/sessions/client/requests/index.ts @@ -1,3 +1,5 @@ -export { type SessionsListRequest } from "./SessionsListRequest.js"; -export { type CreateSessionDto } from "./CreateSessionDto.js"; -export { type UpdateSessionDto } from "./UpdateSessionDto.js"; +export type { CreateSessionDto } from "./CreateSessionDto.js"; +export type { DeleteSessionsRequest } from "./DeleteSessionsRequest.js"; +export type { GetSessionsRequest } from "./GetSessionsRequest.js"; +export type { ListSessionsRequest } from "./ListSessionsRequest.js"; +export type { UpdateSessionDto } from "./UpdateSessionDto.js"; diff --git a/src/api/resources/sessions/index.ts b/src/api/resources/sessions/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/sessions/index.ts +++ b/src/api/resources/sessions/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/sessions/types/CreateSessionDtoMessagesItem.ts b/src/api/resources/sessions/types/CreateSessionDtoMessagesItem.ts index 3c52cbf2..ec18cb2d 100644 --- a/src/api/resources/sessions/types/CreateSessionDtoMessagesItem.ts +++ b/src/api/resources/sessions/types/CreateSessionDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; export type CreateSessionDtoMessagesItem = | Vapi.SystemMessage diff --git a/src/api/resources/sessions/types/CreateSessionDtoStatus.ts b/src/api/resources/sessions/types/CreateSessionDtoStatus.ts index a7950b98..e90e2195 100644 --- a/src/api/resources/sessions/types/CreateSessionDtoStatus.ts +++ b/src/api/resources/sessions/types/CreateSessionDtoStatus.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the current status of the session. Can be either 'active' or 'completed'. - */ -export type CreateSessionDtoStatus = "active" | "completed"; +/** This is the current status of the session. Can be either 'active' or 'completed'. */ export const CreateSessionDtoStatus = { Active: "active", Completed: "completed", } as const; +export type CreateSessionDtoStatus = (typeof CreateSessionDtoStatus)[keyof typeof CreateSessionDtoStatus]; diff --git a/src/api/resources/sessions/types/ListSessionsRequestSortOrder.ts b/src/api/resources/sessions/types/ListSessionsRequestSortOrder.ts new file mode 100644 index 00000000..8f291a21 --- /dev/null +++ b/src/api/resources/sessions/types/ListSessionsRequestSortOrder.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ListSessionsRequestSortOrder = { + Asc: "ASC", + Desc: "DESC", +} as const; +export type ListSessionsRequestSortOrder = + (typeof ListSessionsRequestSortOrder)[keyof typeof ListSessionsRequestSortOrder]; diff --git a/src/api/resources/sessions/types/SessionsListRequestSortOrder.ts b/src/api/resources/sessions/types/SessionsListRequestSortOrder.ts deleted file mode 100644 index 520d6353..00000000 --- a/src/api/resources/sessions/types/SessionsListRequestSortOrder.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type SessionsListRequestSortOrder = "ASC" | "DESC"; -export const SessionsListRequestSortOrder = { - Asc: "ASC", - Desc: "DESC", -} as const; diff --git a/src/api/resources/sessions/types/UpdateSessionDtoMessagesItem.ts b/src/api/resources/sessions/types/UpdateSessionDtoMessagesItem.ts index 89b2045e..90f236b4 100644 --- a/src/api/resources/sessions/types/UpdateSessionDtoMessagesItem.ts +++ b/src/api/resources/sessions/types/UpdateSessionDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; export type UpdateSessionDtoMessagesItem = | Vapi.SystemMessage diff --git a/src/api/resources/sessions/types/UpdateSessionDtoStatus.ts b/src/api/resources/sessions/types/UpdateSessionDtoStatus.ts index 064ab2cf..32c76bdc 100644 --- a/src/api/resources/sessions/types/UpdateSessionDtoStatus.ts +++ b/src/api/resources/sessions/types/UpdateSessionDtoStatus.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the new status for the session. - */ -export type UpdateSessionDtoStatus = "active" | "completed"; +/** This is the new status for the session. */ export const UpdateSessionDtoStatus = { Active: "active", Completed: "completed", } as const; +export type UpdateSessionDtoStatus = (typeof UpdateSessionDtoStatus)[keyof typeof UpdateSessionDtoStatus]; diff --git a/src/api/resources/sessions/types/index.ts b/src/api/resources/sessions/types/index.ts index a14f8866..15e1abf7 100644 --- a/src/api/resources/sessions/types/index.ts +++ b/src/api/resources/sessions/types/index.ts @@ -1,5 +1,5 @@ -export * from "./SessionsListRequestSortOrder.js"; -export * from "./CreateSessionDtoStatus.js"; export * from "./CreateSessionDtoMessagesItem.js"; -export * from "./UpdateSessionDtoStatus.js"; +export * from "./CreateSessionDtoStatus.js"; +export * from "./ListSessionsRequestSortOrder.js"; export * from "./UpdateSessionDtoMessagesItem.js"; +export * from "./UpdateSessionDtoStatus.js"; diff --git a/src/api/resources/squads/client/Client.ts b/src/api/resources/squads/client/Client.ts index b1ef1c0b..ba3f6ba6 100644 --- a/src/api/resources/squads/client/Client.ts +++ b/src/api/resources/squads/client/Client.ts @@ -1,72 +1,43 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Squads { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace SquadsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Squads { - protected readonly _options: Squads.Options; +export class SquadsClient { + protected readonly _options: SquadsClient.Options; - constructor(_options: Squads.Options) { - this._options = _options; + constructor(options: SquadsClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {Vapi.SquadsListRequest} request - * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ListSquadsRequest} request + * @param {SquadsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.squads.list({ - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.squads.list() */ public list( - request: Vapi.SquadsListRequest = {}, - requestOptions?: Squads.RequestOptions, + request: Vapi.ListSquadsRequest = {}, + requestOptions?: SquadsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); } private async __list( - request: Vapi.SquadsListRequest = {}, - requestOptions?: Squads.RequestOptions, + request: Vapi.ListSquadsRequest = {}, + requestOptions?: SquadsClient.RequestOptions, ): Promise> { const { limit, @@ -80,43 +51,43 @@ export class Squads { updatedAtLe, } = request; const _queryParams: Record = {}; - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -131,9 +102,11 @@ export class Squads { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Squad[], rawResponse: _response.rawResponse }; @@ -166,7 +139,7 @@ export class Squads { /** * @param {Vapi.CreateSquadDto} request - * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * @param {SquadsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.squads.create({ @@ -175,16 +148,16 @@ export class Squads { */ public create( request: Vapi.CreateSquadDto, - requestOptions?: Squads.RequestOptions, + requestOptions?: SquadsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( request: Vapi.CreateSquadDto, - requestOptions?: Squads.RequestOptions, + requestOptions?: SquadsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -202,9 +175,11 @@ export class Squads { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Squad, rawResponse: _response.rawResponse }; @@ -236,18 +211,27 @@ export class Squads { } /** - * @param {string} id - * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.GetSquadsRequest} request + * @param {SquadsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.squads.get("id") + * await client.squads.get({ + * id: "id" + * }) */ - public get(id: string, requestOptions?: Squads.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + public get( + request: Vapi.GetSquadsRequest, + requestOptions?: SquadsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } - private async __get(id: string, requestOptions?: Squads.RequestOptions): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + private async __get( + request: Vapi.GetSquadsRequest, + requestOptions?: SquadsClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -257,14 +241,16 @@ export class Squads { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `squad/${encodeURIComponent(id)}`, + `squad/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Squad, rawResponse: _response.rawResponse }; @@ -296,21 +282,27 @@ export class Squads { } /** - * @param {string} id - * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.DeleteSquadsRequest} request + * @param {SquadsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.squads.delete("id") + * await client.squads.delete({ + * id: "id" + * }) */ - public delete(id: string, requestOptions?: Squads.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + public delete( + request: Vapi.DeleteSquadsRequest, + requestOptions?: SquadsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions)); } private async __delete( - id: string, - requestOptions?: Squads.RequestOptions, + request: Vapi.DeleteSquadsRequest, + requestOptions?: SquadsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -320,14 +312,16 @@ export class Squads { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `squad/${encodeURIComponent(id)}`, + `squad/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Squad, rawResponse: _response.rawResponse }; @@ -359,29 +353,28 @@ export class Squads { } /** - * @param {string} id * @param {Vapi.UpdateSquadDto} request - * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * @param {SquadsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.squads.update("id", { + * await client.squads.update({ + * id: "id", * members: [{}] * }) */ public update( - id: string, request: Vapi.UpdateSquadDto, - requestOptions?: Squads.RequestOptions, + requestOptions?: SquadsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); } private async __update( - id: string, request: Vapi.UpdateSquadDto, - requestOptions?: Squads.RequestOptions, + requestOptions?: SquadsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id, ..._body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -391,17 +384,19 @@ export class Squads { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `squad/${encodeURIComponent(id)}`, + `squad/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.Squad, rawResponse: _response.rawResponse }; diff --git a/src/api/resources/squads/client/index.ts b/src/api/resources/squads/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/squads/client/index.ts +++ b/src/api/resources/squads/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/squads/client/requests/DeleteSquadsRequest.ts b/src/api/resources/squads/client/requests/DeleteSquadsRequest.ts new file mode 100644 index 00000000..5cd563a5 --- /dev/null +++ b/src/api/resources/squads/client/requests/DeleteSquadsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface DeleteSquadsRequest { + id: string; +} diff --git a/src/api/resources/squads/client/requests/GetSquadsRequest.ts b/src/api/resources/squads/client/requests/GetSquadsRequest.ts new file mode 100644 index 00000000..2f2b0acf --- /dev/null +++ b/src/api/resources/squads/client/requests/GetSquadsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface GetSquadsRequest { + id: string; +} diff --git a/src/api/resources/squads/client/requests/ListSquadsRequest.ts b/src/api/resources/squads/client/requests/ListSquadsRequest.ts new file mode 100644 index 00000000..c28a1ef3 --- /dev/null +++ b/src/api/resources/squads/client/requests/ListSquadsRequest.ts @@ -0,0 +1,26 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * {} + */ +export interface ListSquadsRequest { + /** This is the maximum number of items to return. Defaults to 100. */ + limit?: number; + /** This will return items where the createdAt is greater than the specified value. */ + createdAtGt?: string; + /** This will return items where the createdAt is less than the specified value. */ + createdAtLt?: string; + /** This will return items where the createdAt is greater than or equal to the specified value. */ + createdAtGe?: string; + /** This will return items where the createdAt is less than or equal to the specified value. */ + createdAtLe?: string; + /** This will return items where the updatedAt is greater than the specified value. */ + updatedAtGt?: string; + /** This will return items where the updatedAt is less than the specified value. */ + updatedAtLt?: string; + /** This will return items where the updatedAt is greater than or equal to the specified value. */ + updatedAtGe?: string; + /** This will return items where the updatedAt is less than or equal to the specified value. */ + updatedAtLe?: string; +} diff --git a/src/api/resources/squads/client/requests/UpdateSquadDto.ts b/src/api/resources/squads/client/requests/UpdateSquadDto.ts index 2cb04dd4..a32aa589 100644 --- a/src/api/resources/squads/client/requests/UpdateSquadDto.ts +++ b/src/api/resources/squads/client/requests/UpdateSquadDto.ts @@ -1,16 +1,16 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example * { + * id: "id", * members: [{}] * } */ export interface UpdateSquadDto { + id: string; /** This is the name of the squad. */ name?: string; /** diff --git a/src/api/resources/squads/client/requests/index.ts b/src/api/resources/squads/client/requests/index.ts index 9a56eb2a..9c722685 100644 --- a/src/api/resources/squads/client/requests/index.ts +++ b/src/api/resources/squads/client/requests/index.ts @@ -1,2 +1,4 @@ -export { type SquadsListRequest } from "./SquadsListRequest.js"; -export { type UpdateSquadDto } from "./UpdateSquadDto.js"; +export type { DeleteSquadsRequest } from "./DeleteSquadsRequest.js"; +export type { GetSquadsRequest } from "./GetSquadsRequest.js"; +export type { ListSquadsRequest } from "./ListSquadsRequest.js"; +export type { UpdateSquadDto } from "./UpdateSquadDto.js"; diff --git a/src/api/resources/structuredOutputs/client/Client.ts b/src/api/resources/structuredOutputs/client/Client.ts index 78370bcc..668a232b 100644 --- a/src/api/resources/structuredOutputs/client/Client.ts +++ b/src/api/resources/structuredOutputs/client/Client.ts @@ -1,76 +1,43 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace StructuredOutputs { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace StructuredOutputsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class StructuredOutputs { - protected readonly _options: StructuredOutputs.Options; +export class StructuredOutputsClient { + protected readonly _options: StructuredOutputsClient.Options; - constructor(_options: StructuredOutputs.Options) { - this._options = _options; + constructor(options: StructuredOutputsClient.Options) { + this._options = normalizeClientOptions(options); } /** * @param {Vapi.StructuredOutputControllerFindAllRequest} request - * @param {StructuredOutputs.RequestOptions} requestOptions - Request-specific configuration. + * @param {StructuredOutputsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.structuredOutputs.structuredOutputControllerFindAll({ - * id: "id", - * name: "name", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.structuredOutputs.structuredOutputControllerFindAll() */ public structuredOutputControllerFindAll( request: Vapi.StructuredOutputControllerFindAllRequest = {}, - requestOptions?: StructuredOutputs.RequestOptions, + requestOptions?: StructuredOutputsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerFindAll(request, requestOptions)); } private async __structuredOutputControllerFindAll( request: Vapi.StructuredOutputControllerFindAllRequest = {}, - requestOptions?: StructuredOutputs.RequestOptions, + requestOptions?: StructuredOutputsClient.RequestOptions, ): Promise> { const { id, @@ -88,59 +55,59 @@ export class StructuredOutputs { updatedAtLe, } = request; const _queryParams: Record = {}; - if (id !== undefined) { - _queryParams["id"] = id; + if (id != null) { + _queryParams.id = id; } - if (name !== undefined) { - _queryParams["name"] = name; + if (name != null) { + _queryParams.name = name; } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; + if (page != null) { + _queryParams.page = page.toString(); } - if (sortOrder !== undefined) { - _queryParams["sortOrder"] = sortOrder; + if (sortOrder != null) { + _queryParams.sortOrder = sortOrder; } - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -155,9 +122,11 @@ export class StructuredOutputs { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { @@ -193,7 +162,7 @@ export class StructuredOutputs { /** * @param {Vapi.CreateStructuredOutputDto} request - * @param {StructuredOutputs.RequestOptions} requestOptions - Request-specific configuration. + * @param {StructuredOutputsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.structuredOutputs.structuredOutputControllerCreate({ @@ -205,16 +174,16 @@ export class StructuredOutputs { */ public structuredOutputControllerCreate( request: Vapi.CreateStructuredOutputDto, - requestOptions?: StructuredOutputs.RequestOptions, + requestOptions?: StructuredOutputsClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerCreate(request, requestOptions)); } private async __structuredOutputControllerCreate( request: Vapi.CreateStructuredOutputDto, - requestOptions?: StructuredOutputs.RequestOptions, + requestOptions?: StructuredOutputsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -232,9 +201,11 @@ export class StructuredOutputs { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.StructuredOutput, rawResponse: _response.rawResponse }; @@ -266,24 +237,27 @@ export class StructuredOutputs { } /** - * @param {string} id - * @param {StructuredOutputs.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.StructuredOutputControllerFindOneRequest} request + * @param {StructuredOutputsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.structuredOutputs.structuredOutputControllerFindOne("id") + * await client.structuredOutputs.structuredOutputControllerFindOne({ + * id: "id" + * }) */ public structuredOutputControllerFindOne( - id: string, - requestOptions?: StructuredOutputs.RequestOptions, + request: Vapi.StructuredOutputControllerFindOneRequest, + requestOptions?: StructuredOutputsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerFindOne(id, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerFindOne(request, requestOptions)); } private async __structuredOutputControllerFindOne( - id: string, - requestOptions?: StructuredOutputs.RequestOptions, + request: Vapi.StructuredOutputControllerFindOneRequest, + requestOptions?: StructuredOutputsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -293,14 +267,16 @@ export class StructuredOutputs { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `structured-output/${encodeURIComponent(id)}`, + `structured-output/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.StructuredOutput, rawResponse: _response.rawResponse }; @@ -332,24 +308,27 @@ export class StructuredOutputs { } /** - * @param {string} id - * @param {StructuredOutputs.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.StructuredOutputControllerRemoveRequest} request + * @param {StructuredOutputsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.structuredOutputs.structuredOutputControllerRemove("id") + * await client.structuredOutputs.structuredOutputControllerRemove({ + * id: "id" + * }) */ public structuredOutputControllerRemove( - id: string, - requestOptions?: StructuredOutputs.RequestOptions, + request: Vapi.StructuredOutputControllerRemoveRequest, + requestOptions?: StructuredOutputsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerRemove(id, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerRemove(request, requestOptions)); } private async __structuredOutputControllerRemove( - id: string, - requestOptions?: StructuredOutputs.RequestOptions, + request: Vapi.StructuredOutputControllerRemoveRequest, + requestOptions?: StructuredOutputsClient.RequestOptions, ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -359,14 +338,16 @@ export class StructuredOutputs { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `structured-output/${encodeURIComponent(id)}`, + `structured-output/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.StructuredOutput, rawResponse: _response.rawResponse }; @@ -398,34 +379,30 @@ export class StructuredOutputs { } /** - * @param {string} id * @param {Vapi.UpdateStructuredOutputDto} request - * @param {StructuredOutputs.RequestOptions} requestOptions - Request-specific configuration. + * @param {StructuredOutputsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.structuredOutputs.structuredOutputControllerUpdate("id", { + * await client.structuredOutputs.structuredOutputControllerUpdate({ + * id: "id", * schemaOverride: "schemaOverride" * }) */ public structuredOutputControllerUpdate( - id: string, request: Vapi.UpdateStructuredOutputDto, - requestOptions?: StructuredOutputs.RequestOptions, + requestOptions?: StructuredOutputsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise( - this.__structuredOutputControllerUpdate(id, request, requestOptions), - ); + return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerUpdate(request, requestOptions)); } private async __structuredOutputControllerUpdate( - id: string, request: Vapi.UpdateStructuredOutputDto, - requestOptions?: StructuredOutputs.RequestOptions, + requestOptions?: StructuredOutputsClient.RequestOptions, ): Promise> { - const { schemaOverride, ..._body } = request; + const { id, schemaOverride, ..._body } = request; const _queryParams: Record = {}; - _queryParams["schemaOverride"] = schemaOverride; - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _queryParams.schemaOverride = schemaOverride; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -435,7 +412,7 @@ export class StructuredOutputs { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `structured-output/${encodeURIComponent(id)}`, + `structured-output/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -443,9 +420,11 @@ export class StructuredOutputs { queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", body: _body, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { return { data: _response.body as Vapi.StructuredOutput, rawResponse: _response.rawResponse }; @@ -476,6 +455,154 @@ export class StructuredOutputs { } } + /** + * @param {Vapi.StructuredOutputRunDto} request + * @param {StructuredOutputsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.structuredOutputs.structuredOutputControllerRun({ + * callIds: ["callIds"] + * }) + */ + public structuredOutputControllerRun( + request: Vapi.StructuredOutputRunDto, + requestOptions?: StructuredOutputsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerRun(request, requestOptions)); + } + + private async __structuredOutputControllerRun( + request: Vapi.StructuredOutputRunDto, + requestOptions?: StructuredOutputsClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + "structured-output/run", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Vapi.StructuredOutput, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling POST /structured-output/run."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Analyzes assistant configuration and generates contextual structured output recommendations + * + * @param {Vapi.GenerateStructuredOutputSuggestionsDto} request + * @param {StructuredOutputsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.structuredOutputs.structuredOutputControllerSuggest({ + * assistantId: "550e8400-e29b-41d4-a716-446655440000" + * }) + */ + public structuredOutputControllerSuggest( + request: Vapi.GenerateStructuredOutputSuggestionsDto, + requestOptions?: StructuredOutputsClient.RequestOptions, + ): core.HttpResponsePromise[]> { + return core.HttpResponsePromise.fromPromise(this.__structuredOutputControllerSuggest(request, requestOptions)); + } + + private async __structuredOutputControllerSuggest( + request: Vapi.GenerateStructuredOutputSuggestionsDto, + requestOptions?: StructuredOutputsClient.RequestOptions, + ): Promise[]>> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.VapiEnvironment.Default, + "structured-output/suggest", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: _response.body as Record[], rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.VapiError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.VapiTimeoutError("Timeout exceeded when calling POST /structured-output/suggest."); + case "unknown": + throw new errors.VapiError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + protected async _getAuthorizationHeader(): Promise { return `Bearer ${await core.Supplier.get(this._options.token)}`; } diff --git a/src/api/resources/structuredOutputs/client/index.ts b/src/api/resources/structuredOutputs/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/structuredOutputs/client/index.ts +++ b/src/api/resources/structuredOutputs/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/structuredOutputs/client/requests/GenerateStructuredOutputSuggestionsDto.ts b/src/api/resources/structuredOutputs/client/requests/GenerateStructuredOutputSuggestionsDto.ts new file mode 100644 index 00000000..a2693692 --- /dev/null +++ b/src/api/resources/structuredOutputs/client/requests/GenerateStructuredOutputSuggestionsDto.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * assistantId: "550e8400-e29b-41d4-a716-446655440000" + * } + */ +export interface GenerateStructuredOutputSuggestionsDto { + /** The assistant ID to analyze and generate suggestions for */ + assistantId: string; + /** Number of suggestions to generate */ + count?: number; + /** Existing structured output IDs to exclude from suggestions */ + excludeIds?: string[]; + /** Iteration/seed for generating diverse suggestions (0 = first generation, 1+ = regenerations with increasing specificity) */ + seed?: number; +} diff --git a/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerFindAllRequest.ts b/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerFindAllRequest.ts index ed262c90..35b3658f 100644 --- a/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerFindAllRequest.ts +++ b/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerFindAllRequest.ts @@ -1,52 +1,36 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example - * { - * id: "id", - * name: "name", - * page: 1.1, - * sortOrder: "ASC", - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * } + * {} */ export interface StructuredOutputControllerFindAllRequest { /** This will return structured outputs where the id matches the specified value. */ - id?: string | null; + id?: string; /** This will return structured outputs where the name matches the specified value. */ - name?: string | null; + name?: string; /** This is the page number to return. Defaults to 1. */ - page?: number | null; + page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ - sortOrder?: Vapi.StructuredOutputControllerFindAllRequestSortOrder | null; + sortOrder?: Vapi.StructuredOutputControllerFindAllRequestSortOrder; /** This is the maximum number of items to return. Defaults to 100. */ - limit?: number | null; + limit?: number; /** This will return items where the createdAt is greater than the specified value. */ - createdAtGt?: string | null; + createdAtGt?: string; /** This will return items where the createdAt is less than the specified value. */ - createdAtLt?: string | null; + createdAtLt?: string; /** This will return items where the createdAt is greater than or equal to the specified value. */ - createdAtGe?: string | null; + createdAtGe?: string; /** This will return items where the createdAt is less than or equal to the specified value. */ - createdAtLe?: string | null; + createdAtLe?: string; /** This will return items where the updatedAt is greater than the specified value. */ - updatedAtGt?: string | null; + updatedAtGt?: string; /** This will return items where the updatedAt is less than the specified value. */ - updatedAtLt?: string | null; + updatedAtLt?: string; /** This will return items where the updatedAt is greater than or equal to the specified value. */ - updatedAtGe?: string | null; + updatedAtGe?: string; /** This will return items where the updatedAt is less than or equal to the specified value. */ - updatedAtLe?: string | null; + updatedAtLe?: string; } diff --git a/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerFindOneRequest.ts b/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerFindOneRequest.ts new file mode 100644 index 00000000..f5d98247 --- /dev/null +++ b/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerFindOneRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface StructuredOutputControllerFindOneRequest { + id: string; +} diff --git a/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerRemoveRequest.ts b/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerRemoveRequest.ts new file mode 100644 index 00000000..9b6cb614 --- /dev/null +++ b/src/api/resources/structuredOutputs/client/requests/StructuredOutputControllerRemoveRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface StructuredOutputControllerRemoveRequest { + id: string; +} diff --git a/src/api/resources/structuredOutputs/client/requests/StructuredOutputRunDto.ts b/src/api/resources/structuredOutputs/client/requests/StructuredOutputRunDto.ts new file mode 100644 index 00000000..4c710e21 --- /dev/null +++ b/src/api/resources/structuredOutputs/client/requests/StructuredOutputRunDto.ts @@ -0,0 +1,32 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * callIds: ["callIds"] + * } + */ +export interface StructuredOutputRunDto { + /** + * 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. + */ + previewEnabled?: boolean; + /** + * 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. + */ + structuredOutputId?: string; + /** + * 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. + */ + structuredOutput?: Vapi.CreateStructuredOutputDto; + /** + * 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. + */ + callIds: string[]; +} diff --git a/src/api/resources/structuredOutputs/client/requests/UpdateStructuredOutputDto.ts b/src/api/resources/structuredOutputs/client/requests/UpdateStructuredOutputDto.ts index fd4ee6c6..adcd4dfa 100644 --- a/src/api/resources/structuredOutputs/client/requests/UpdateStructuredOutputDto.ts +++ b/src/api/resources/structuredOutputs/client/requests/UpdateStructuredOutputDto.ts @@ -1,16 +1,16 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../../../../index.js"; /** * @example * { + * id: "id", * schemaOverride: "schemaOverride" * } */ export interface UpdateStructuredOutputDto { + id: string; schemaOverride: string; /** * This is the model that will be used to extract the structured output. @@ -28,6 +28,8 @@ export interface UpdateStructuredOutputDto { * If messages or required fields are not specified, the default system and user prompts will be used. */ model?: Vapi.UpdateStructuredOutputDtoModel; + /** Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. */ + compliancePlan?: Vapi.ComplianceOverride; /** This is the name of the structured output. */ name?: string; /** diff --git a/src/api/resources/structuredOutputs/client/requests/index.ts b/src/api/resources/structuredOutputs/client/requests/index.ts index 5db40ca7..6646963a 100644 --- a/src/api/resources/structuredOutputs/client/requests/index.ts +++ b/src/api/resources/structuredOutputs/client/requests/index.ts @@ -1,3 +1,6 @@ -export { type StructuredOutputControllerFindAllRequest } from "./StructuredOutputControllerFindAllRequest.js"; -export { type CreateStructuredOutputDto } from "./CreateStructuredOutputDto.js"; -export { type UpdateStructuredOutputDto } from "./UpdateStructuredOutputDto.js"; +export type { GenerateStructuredOutputSuggestionsDto } from "./GenerateStructuredOutputSuggestionsDto.js"; +export type { StructuredOutputControllerFindAllRequest } from "./StructuredOutputControllerFindAllRequest.js"; +export type { StructuredOutputControllerFindOneRequest } from "./StructuredOutputControllerFindOneRequest.js"; +export type { StructuredOutputControllerRemoveRequest } from "./StructuredOutputControllerRemoveRequest.js"; +export type { StructuredOutputRunDto } from "./StructuredOutputRunDto.js"; +export type { UpdateStructuredOutputDto } from "./UpdateStructuredOutputDto.js"; diff --git a/src/api/resources/structuredOutputs/index.ts b/src/api/resources/structuredOutputs/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/structuredOutputs/index.ts +++ b/src/api/resources/structuredOutputs/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/structuredOutputs/types/StructuredOutputControllerFindAllRequestSortOrder.ts b/src/api/resources/structuredOutputs/types/StructuredOutputControllerFindAllRequestSortOrder.ts index 5e7faeff..5e6e0f46 100644 --- a/src/api/resources/structuredOutputs/types/StructuredOutputControllerFindAllRequestSortOrder.ts +++ b/src/api/resources/structuredOutputs/types/StructuredOutputControllerFindAllRequestSortOrder.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type StructuredOutputControllerFindAllRequestSortOrder = "ASC" | "DESC"; export const StructuredOutputControllerFindAllRequestSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type StructuredOutputControllerFindAllRequestSortOrder = + (typeof StructuredOutputControllerFindAllRequestSortOrder)[keyof typeof StructuredOutputControllerFindAllRequestSortOrder]; diff --git a/src/api/resources/structuredOutputs/types/UpdateStructuredOutputDtoModel.ts b/src/api/resources/structuredOutputs/types/UpdateStructuredOutputDtoModel.ts index bd724ad1..5ef31090 100644 --- a/src/api/resources/structuredOutputs/types/UpdateStructuredOutputDtoModel.ts +++ b/src/api/resources/structuredOutputs/types/UpdateStructuredOutputDtoModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; /** * This is the model that will be used to extract the structured output. diff --git a/src/api/resources/structuredOutputs/types/index.ts b/src/api/resources/structuredOutputs/types/index.ts index 14028a45..b55fe20d 100644 --- a/src/api/resources/structuredOutputs/types/index.ts +++ b/src/api/resources/structuredOutputs/types/index.ts @@ -1,3 +1,2 @@ export * from "./StructuredOutputControllerFindAllRequestSortOrder.js"; -export * from "./CreateStructuredOutputDtoModel.js"; export * from "./UpdateStructuredOutputDtoModel.js"; diff --git a/src/api/resources/tools/client/Client.ts b/src/api/resources/tools/client/Client.ts index 6dce218a..4b86bba7 100644 --- a/src/api/resources/tools/client/Client.ts +++ b/src/api/resources/tools/client/Client.ts @@ -1,73 +1,44 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import * as Vapi from "../../../index.js"; +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import { normalizeClientOptions } from "../../../../BaseClient.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as core from "../../../../core/index.js"; +import * as environments from "../../../../environments.js"; import * as errors from "../../../../errors/index.js"; +import type * as Vapi from "../../../index.js"; -export declare namespace Tools { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | null | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace ToolsClient { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | null | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Tools { - protected readonly _options: Tools.Options; +export class ToolsClient { + protected readonly _options: ToolsClient.Options; - constructor(_options: Tools.Options) { - this._options = _options; + constructor(options: ToolsClient.Options) { + this._options = normalizeClientOptions(options); } /** - * @param {Vapi.ToolsListRequest} request - * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.ListToolsRequest} request + * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.tools.list({ - * limit: 1.1, - * createdAtGt: "2024-01-15T09:30:00Z", - * createdAtLt: "2024-01-15T09:30:00Z", - * createdAtGe: "2024-01-15T09:30:00Z", - * createdAtLe: "2024-01-15T09:30:00Z", - * updatedAtGt: "2024-01-15T09:30:00Z", - * updatedAtLt: "2024-01-15T09:30:00Z", - * updatedAtGe: "2024-01-15T09:30:00Z", - * updatedAtLe: "2024-01-15T09:30:00Z" - * }) + * await client.tools.list() */ public list( - request: Vapi.ToolsListRequest = {}, - requestOptions?: Tools.RequestOptions, - ): core.HttpResponsePromise { + request: Vapi.ListToolsRequest = {}, + requestOptions?: ToolsClient.RequestOptions, + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); } private async __list( - request: Vapi.ToolsListRequest = {}, - requestOptions?: Tools.RequestOptions, - ): Promise> { + request: Vapi.ListToolsRequest = {}, + requestOptions?: ToolsClient.RequestOptions, + ): Promise> { const { limit, createdAtGt, @@ -80,43 +51,43 @@ export class Tools { updatedAtLe, } = request; const _queryParams: Record = {}; - if (limit !== undefined) { - _queryParams["limit"] = limit?.toString() ?? null; + if (limit != null) { + _queryParams.limit = limit.toString(); } - if (createdAtGt !== undefined) { - _queryParams["createdAtGt"] = createdAtGt; + if (createdAtGt != null) { + _queryParams.createdAtGt = createdAtGt; } - if (createdAtLt !== undefined) { - _queryParams["createdAtLt"] = createdAtLt; + if (createdAtLt != null) { + _queryParams.createdAtLt = createdAtLt; } - if (createdAtGe !== undefined) { - _queryParams["createdAtGe"] = createdAtGe; + if (createdAtGe != null) { + _queryParams.createdAtGe = createdAtGe; } - if (createdAtLe !== undefined) { - _queryParams["createdAtLe"] = createdAtLe; + if (createdAtLe != null) { + _queryParams.createdAtLe = createdAtLe; } - if (updatedAtGt !== undefined) { - _queryParams["updatedAtGt"] = updatedAtGt; + if (updatedAtGt != null) { + _queryParams.updatedAtGt = updatedAtGt; } - if (updatedAtLt !== undefined) { - _queryParams["updatedAtLt"] = updatedAtLt; + if (updatedAtLt != null) { + _queryParams.updatedAtLt = updatedAtLt; } - if (updatedAtGe !== undefined) { - _queryParams["updatedAtGe"] = updatedAtGe; + if (updatedAtGe != null) { + _queryParams.updatedAtGe = updatedAtGe; } - if (updatedAtLe !== undefined) { - _queryParams["updatedAtLe"] = updatedAtLe; + if (updatedAtLe != null) { + _queryParams.updatedAtLe = updatedAtLe; } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -131,12 +102,14 @@ export class Tools { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.ToolsListResponseItem[], rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.ListToolsResponseItem[], rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -165,8 +138,8 @@ export class Tools { } /** - * @param {Vapi.ToolsCreateRequest} request - * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.CreateToolsRequest} request + * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.tools.create({ @@ -176,17 +149,17 @@ export class Tools { * }) */ public create( - request: Vapi.ToolsCreateRequest, - requestOptions?: Tools.RequestOptions, - ): core.HttpResponsePromise { + request: Vapi.CreateToolsRequest, + requestOptions?: ToolsClient.RequestOptions, + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( - request: Vapi.ToolsCreateRequest, - requestOptions?: Tools.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + request: Vapi.CreateToolsRequest, + requestOptions?: ToolsClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -204,12 +177,14 @@ export class Tools { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.ToolsCreateResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.CreateToolsResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -238,21 +213,27 @@ export class Tools { } /** - * @param {string} id - * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.GetToolsRequest} request + * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.tools.get("id") + * await client.tools.get({ + * id: "id" + * }) */ - public get(id: string, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + public get( + request: Vapi.GetToolsRequest, + requestOptions?: ToolsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions)); } private async __get( - id: string, - requestOptions?: Tools.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + request: Vapi.GetToolsRequest, + requestOptions?: ToolsClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -262,17 +243,19 @@ export class Tools { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `tool/${encodeURIComponent(id)}`, + `tool/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.ToolsGetResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.GetToolsResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -301,24 +284,27 @@ export class Tools { } /** - * @param {string} id - * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.DeleteToolsRequest} request + * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.tools.delete("id") + * await client.tools.delete({ + * id: "id" + * }) */ public delete( - id: string, - requestOptions?: Tools.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + request: Vapi.DeleteToolsRequest, + requestOptions?: ToolsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions)); } private async __delete( - id: string, - requestOptions?: Tools.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + request: Vapi.DeleteToolsRequest, + requestOptions?: ToolsClient.RequestOptions, + ): Promise> { + const { id } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -328,17 +314,19 @@ export class Tools { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `tool/${encodeURIComponent(id)}`, + `tool/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.ToolsDeleteResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.DeleteToolsResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { @@ -367,27 +355,28 @@ export class Tools { } /** - * @param {string} id - * @param {Vapi.ToolsUpdateRequest} request - * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * @param {Vapi.UpdateToolsRequest} request + * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example - * await client.tools.update("id", {}) + * await client.tools.update({ + * id: "id", + * body: {} + * }) */ public update( - id: string, - request: Vapi.ToolsUpdateRequest, - requestOptions?: Tools.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + request: Vapi.UpdateToolsRequest, + requestOptions?: ToolsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions)); } private async __update( - id: string, - request: Vapi.ToolsUpdateRequest, - requestOptions?: Tools.RequestOptions, - ): Promise> { - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + request: Vapi.UpdateToolsRequest, + requestOptions?: ToolsClient.RequestOptions, + ): Promise> { + const { id, body: _body } = request; + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), requestOptions?.headers, @@ -397,20 +386,22 @@ export class Tools { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.VapiEnvironment.Default, - `tool/${encodeURIComponent(id)}`, + `tool/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + body: _body, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Vapi.ToolsUpdateResponse, rawResponse: _response.rawResponse }; + return { data: _response.body as Vapi.UpdateToolsResponse, rawResponse: _response.rawResponse }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/tools/client/index.ts b/src/api/resources/tools/client/index.ts index 82648c6f..195f9aa8 100644 --- a/src/api/resources/tools/client/index.ts +++ b/src/api/resources/tools/client/index.ts @@ -1,2 +1 @@ -export {}; export * from "./requests/index.js"; diff --git a/src/api/resources/tools/client/requests/DeleteToolsRequest.ts b/src/api/resources/tools/client/requests/DeleteToolsRequest.ts new file mode 100644 index 00000000..5e0c2ff4 --- /dev/null +++ b/src/api/resources/tools/client/requests/DeleteToolsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface DeleteToolsRequest { + id: string; +} diff --git a/src/api/resources/tools/client/requests/GetToolsRequest.ts b/src/api/resources/tools/client/requests/GetToolsRequest.ts new file mode 100644 index 00000000..02a347cd --- /dev/null +++ b/src/api/resources/tools/client/requests/GetToolsRequest.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * id: "id" + * } + */ +export interface GetToolsRequest { + id: string; +} diff --git a/src/api/resources/tools/client/requests/ListToolsRequest.ts b/src/api/resources/tools/client/requests/ListToolsRequest.ts new file mode 100644 index 00000000..ff158b86 --- /dev/null +++ b/src/api/resources/tools/client/requests/ListToolsRequest.ts @@ -0,0 +1,26 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * {} + */ +export interface ListToolsRequest { + /** This is the maximum number of items to return. Defaults to 100. */ + limit?: number; + /** This will return items where the createdAt is greater than the specified value. */ + createdAtGt?: string; + /** This will return items where the createdAt is less than the specified value. */ + createdAtLt?: string; + /** This will return items where the createdAt is greater than or equal to the specified value. */ + createdAtGe?: string; + /** This will return items where the createdAt is less than or equal to the specified value. */ + createdAtLe?: string; + /** This will return items where the updatedAt is greater than the specified value. */ + updatedAtGt?: string; + /** This will return items where the updatedAt is less than the specified value. */ + updatedAtLt?: string; + /** This will return items where the updatedAt is greater than or equal to the specified value. */ + updatedAtGe?: string; + /** This will return items where the updatedAt is less than or equal to the specified value. */ + updatedAtLe?: string; +} diff --git a/src/api/resources/tools/client/requests/UpdateToolsRequest.ts b/src/api/resources/tools/client/requests/UpdateToolsRequest.ts new file mode 100644 index 00000000..cc82ce39 --- /dev/null +++ b/src/api/resources/tools/client/requests/UpdateToolsRequest.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../../index.js"; + +/** + * @example + * { + * id: "id", + * body: {} + * } + */ +export interface UpdateToolsRequest { + id: string; + body: Vapi.UpdateToolsRequestBody; +} diff --git a/src/api/resources/tools/client/requests/index.ts b/src/api/resources/tools/client/requests/index.ts index fba12e8a..9fea6b87 100644 --- a/src/api/resources/tools/client/requests/index.ts +++ b/src/api/resources/tools/client/requests/index.ts @@ -1 +1,4 @@ -export { type ToolsListRequest } from "./ToolsListRequest.js"; +export type { DeleteToolsRequest } from "./DeleteToolsRequest.js"; +export type { GetToolsRequest } from "./GetToolsRequest.js"; +export type { ListToolsRequest } from "./ListToolsRequest.js"; +export type { UpdateToolsRequest } from "./UpdateToolsRequest.js"; diff --git a/src/api/resources/tools/index.ts b/src/api/resources/tools/index.ts index f095e147..d9adb1af 100644 --- a/src/api/resources/tools/index.ts +++ b/src/api/resources/tools/index.ts @@ -1,2 +1,2 @@ -export * from "./types/index.js"; export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/api/resources/tools/types/ToolsCreateRequest.ts b/src/api/resources/tools/types/CreateToolsRequest.ts similarity index 84% rename from src/api/resources/tools/types/ToolsCreateRequest.ts rename to src/api/resources/tools/types/CreateToolsRequest.ts index 1ca7553a..b5e8daaf 100644 --- a/src/api/resources/tools/types/ToolsCreateRequest.ts +++ b/src/api/resources/tools/types/CreateToolsRequest.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type ToolsCreateRequest = +export type CreateToolsRequest = | Vapi.CreateApiRequestToolDto | Vapi.CreateDtmfToolDto | Vapi.CreateEndCallToolDto diff --git a/src/api/resources/tools/types/ToolsGetResponse.ts b/src/api/resources/tools/types/CreateToolsResponse.ts similarity index 80% rename from src/api/resources/tools/types/ToolsGetResponse.ts rename to src/api/resources/tools/types/CreateToolsResponse.ts index fd302ecc..34a60fc2 100644 --- a/src/api/resources/tools/types/ToolsGetResponse.ts +++ b/src/api/resources/tools/types/CreateToolsResponse.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type ToolsGetResponse = +export type CreateToolsResponse = | Vapi.ApiRequestTool | Vapi.DtmfTool | Vapi.EndCallTool diff --git a/src/api/resources/tools/types/ToolsUpdateResponse.ts b/src/api/resources/tools/types/DeleteToolsResponse.ts similarity index 80% rename from src/api/resources/tools/types/ToolsUpdateResponse.ts rename to src/api/resources/tools/types/DeleteToolsResponse.ts index 1b558b73..24ce206f 100644 --- a/src/api/resources/tools/types/ToolsUpdateResponse.ts +++ b/src/api/resources/tools/types/DeleteToolsResponse.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type ToolsUpdateResponse = +export type DeleteToolsResponse = | Vapi.ApiRequestTool | Vapi.DtmfTool | Vapi.EndCallTool diff --git a/src/api/resources/tools/types/ToolsCreateResponse.ts b/src/api/resources/tools/types/GetToolsResponse.ts similarity index 80% rename from src/api/resources/tools/types/ToolsCreateResponse.ts rename to src/api/resources/tools/types/GetToolsResponse.ts index 06ebc3bc..471eadd9 100644 --- a/src/api/resources/tools/types/ToolsCreateResponse.ts +++ b/src/api/resources/tools/types/GetToolsResponse.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type ToolsCreateResponse = +export type GetToolsResponse = | Vapi.ApiRequestTool | Vapi.DtmfTool | Vapi.EndCallTool diff --git a/src/api/resources/tools/types/ToolsDeleteResponse.ts b/src/api/resources/tools/types/ListToolsResponseItem.ts similarity index 80% rename from src/api/resources/tools/types/ToolsDeleteResponse.ts rename to src/api/resources/tools/types/ListToolsResponseItem.ts index 59b95f09..7d939548 100644 --- a/src/api/resources/tools/types/ToolsDeleteResponse.ts +++ b/src/api/resources/tools/types/ListToolsResponseItem.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type ToolsDeleteResponse = +export type ListToolsResponseItem = | Vapi.ApiRequestTool | Vapi.DtmfTool | Vapi.EndCallTool diff --git a/src/api/resources/tools/types/ToolsListResponseItem.ts b/src/api/resources/tools/types/ToolsListResponseItem.ts deleted file mode 100644 index d9d99b72..00000000 --- a/src/api/resources/tools/types/ToolsListResponseItem.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../../../index.js"; - -export type ToolsListResponseItem = - | Vapi.ApiRequestTool - | Vapi.DtmfTool - | Vapi.EndCallTool - | Vapi.FunctionTool - | Vapi.TransferCallTool - | Vapi.HandoffTool - | Vapi.BashTool - | Vapi.ComputerTool - | Vapi.TextEditorTool - | Vapi.QueryTool - | Vapi.GoogleCalendarCreateEventTool - | Vapi.GoogleSheetsRowAppendTool - | Vapi.GoogleCalendarCheckAvailabilityTool - | Vapi.SlackSendMessageTool - | Vapi.SmsTool - | Vapi.McpTool - | Vapi.GoHighLevelCalendarAvailabilityTool - | Vapi.GoHighLevelCalendarEventCreateTool - | Vapi.GoHighLevelContactCreateTool - | Vapi.GoHighLevelContactGetTool; diff --git a/src/api/resources/tools/types/ToolsUpdateRequest.ts b/src/api/resources/tools/types/UpdateToolsRequestBody.ts similarity index 84% rename from src/api/resources/tools/types/ToolsUpdateRequest.ts rename to src/api/resources/tools/types/UpdateToolsRequestBody.ts index 2456ea4d..f46185f3 100644 --- a/src/api/resources/tools/types/ToolsUpdateRequest.ts +++ b/src/api/resources/tools/types/UpdateToolsRequestBody.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../../../index.js"; -export type ToolsUpdateRequest = +export type UpdateToolsRequestBody = | Vapi.UpdateApiRequestToolDto | Vapi.UpdateDtmfToolDto | Vapi.UpdateEndCallToolDto diff --git a/src/api/resources/tools/types/UpdateToolsResponse.ts b/src/api/resources/tools/types/UpdateToolsResponse.ts new file mode 100644 index 00000000..f0b4957f --- /dev/null +++ b/src/api/resources/tools/types/UpdateToolsResponse.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../../../index.js"; + +export type UpdateToolsResponse = + | Vapi.ApiRequestTool + | Vapi.DtmfTool + | Vapi.EndCallTool + | Vapi.FunctionTool + | Vapi.TransferCallTool + | Vapi.HandoffTool + | Vapi.BashTool + | Vapi.ComputerTool + | Vapi.TextEditorTool + | Vapi.QueryTool + | Vapi.GoogleCalendarCreateEventTool + | Vapi.GoogleSheetsRowAppendTool + | Vapi.GoogleCalendarCheckAvailabilityTool + | Vapi.SlackSendMessageTool + | Vapi.SmsTool + | Vapi.McpTool + | Vapi.GoHighLevelCalendarAvailabilityTool + | Vapi.GoHighLevelCalendarEventCreateTool + | Vapi.GoHighLevelContactCreateTool + | Vapi.GoHighLevelContactGetTool; diff --git a/src/api/resources/tools/types/index.ts b/src/api/resources/tools/types/index.ts index d6f7ce10..d2417d80 100644 --- a/src/api/resources/tools/types/index.ts +++ b/src/api/resources/tools/types/index.ts @@ -1,7 +1,7 @@ -export * from "./ToolsListResponseItem.js"; -export * from "./ToolsCreateRequest.js"; -export * from "./ToolsCreateResponse.js"; -export * from "./ToolsGetResponse.js"; -export * from "./ToolsDeleteResponse.js"; -export * from "./ToolsUpdateRequest.js"; -export * from "./ToolsUpdateResponse.js"; +export * from "./CreateToolsRequest.js"; +export * from "./CreateToolsResponse.js"; +export * from "./DeleteToolsResponse.js"; +export * from "./GetToolsResponse.js"; +export * from "./ListToolsResponseItem.js"; +export * from "./UpdateToolsRequestBody.js"; +export * from "./UpdateToolsResponse.js"; diff --git a/src/api/types/AddVoiceToProviderDto.ts b/src/api/types/AddVoiceToProviderDto.ts index bd3b2885..5fe203a8 100644 --- a/src/api/types/AddVoiceToProviderDto.ts +++ b/src/api/types/AddVoiceToProviderDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface AddVoiceToProviderDto { /** This is the owner_id of your shared voice which you want to add to your provider Account from Provider Voice Library */ diff --git a/src/api/types/AiEdgeCondition.ts b/src/api/types/AiEdgeCondition.ts index 9bbd99fd..94a584f4 100644 --- a/src/api/types/AiEdgeCondition.ts +++ b/src/api/types/AiEdgeCondition.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface AiEdgeCondition { - type: "ai"; + type: Vapi.AiEdgeConditionType; /** This is the prompt for the AI edge condition. It should evaluate to a boolean. */ prompt: string; } diff --git a/src/api/types/AiEdgeConditionType.ts b/src/api/types/AiEdgeConditionType.ts new file mode 100644 index 00000000..1500e779 --- /dev/null +++ b/src/api/types/AiEdgeConditionType.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AiEdgeConditionType = { + Ai: "ai", +} as const; +export type AiEdgeConditionType = (typeof AiEdgeConditionType)[keyof typeof AiEdgeConditionType]; diff --git a/src/api/types/Analysis.ts b/src/api/types/Analysis.ts index 33398ad3..0dc87922 100644 --- a/src/api/types/Analysis.ts +++ b/src/api/types/Analysis.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface Analysis { /** This is the summary of the call. Customize by setting `assistant.analysisPlan.summaryPrompt`. */ diff --git a/src/api/types/AnalysisCost.ts b/src/api/types/AnalysisCost.ts index 9526a52e..821ac3f8 100644 --- a/src/api/types/AnalysisCost.ts +++ b/src/api/types/AnalysisCost.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AnalysisCost { /** This is the type of cost, always 'analysis' for this class. */ - type: "analysis"; + type: Vapi.AnalysisCostType; /** This is the type of analysis performed. */ analysisType: Vapi.AnalysisCostAnalysisType; /** This is the model that was used to perform the analysis. */ diff --git a/src/api/types/AnalysisCostAnalysisType.ts b/src/api/types/AnalysisCostAnalysisType.ts index 7d4e94b6..3deb2e8d 100644 --- a/src/api/types/AnalysisCostAnalysisType.ts +++ b/src/api/types/AnalysisCostAnalysisType.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the type of analysis performed. - */ -export type AnalysisCostAnalysisType = "summary" | "structuredData" | "successEvaluation" | "structuredOutput"; +/** This is the type of analysis performed. */ export const AnalysisCostAnalysisType = { Summary: "summary", StructuredData: "structuredData", SuccessEvaluation: "successEvaluation", StructuredOutput: "structuredOutput", } as const; +export type AnalysisCostAnalysisType = (typeof AnalysisCostAnalysisType)[keyof typeof AnalysisCostAnalysisType]; diff --git a/src/api/types/AnalysisCostBreakdown.ts b/src/api/types/AnalysisCostBreakdown.ts index 645c06cb..7f3e71c1 100644 --- a/src/api/types/AnalysisCostBreakdown.ts +++ b/src/api/types/AnalysisCostBreakdown.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface AnalysisCostBreakdown { /** This is the cost to summarize the call. */ diff --git a/src/api/types/AnalysisCostType.ts b/src/api/types/AnalysisCostType.ts new file mode 100644 index 00000000..b9529b6c --- /dev/null +++ b/src/api/types/AnalysisCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'analysis' for this class. */ +export const AnalysisCostType = { + Analysis: "analysis", +} as const; +export type AnalysisCostType = (typeof AnalysisCostType)[keyof typeof AnalysisCostType]; diff --git a/src/api/types/AnalysisPlan.ts b/src/api/types/AnalysisPlan.ts index bce15c4e..4541bbbc 100644 --- a/src/api/types/AnalysisPlan.ts +++ b/src/api/types/AnalysisPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AnalysisPlan { /** diff --git a/src/api/types/AnalyticsOperation.ts b/src/api/types/AnalyticsOperation.ts index d3c62c2e..945fbb64 100644 --- a/src/api/types/AnalyticsOperation.ts +++ b/src/api/types/AnalyticsOperation.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AnalyticsOperation { /** This is the aggregation operation you want to perform. */ diff --git a/src/api/types/AnalyticsOperationColumn.ts b/src/api/types/AnalyticsOperationColumn.ts index 6181dd74..994c7856 100644 --- a/src/api/types/AnalyticsOperationColumn.ts +++ b/src/api/types/AnalyticsOperationColumn.ts @@ -1,26 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the columns you want to perform the aggregation operation on. - */ -export type AnalyticsOperationColumn = - | "id" - | "cost" - | "costBreakdown.llm" - | "costBreakdown.stt" - | "costBreakdown.tts" - | "costBreakdown.vapi" - | "costBreakdown.transport" - | "costBreakdown.analysisBreakdown.summary" - | "costBreakdown.transcriber" - | "costBreakdown.ttsCharacters" - | "costBreakdown.llmPromptTokens" - | "costBreakdown.llmCompletionTokens" - | "duration" - | "concurrency" - | "minutesUsed"; +/** This is the columns you want to perform the aggregation operation on. */ export const AnalyticsOperationColumn = { Id: "id", Cost: "cost", @@ -38,3 +18,4 @@ export const AnalyticsOperationColumn = { Concurrency: "concurrency", MinutesUsed: "minutesUsed", } as const; +export type AnalyticsOperationColumn = (typeof AnalyticsOperationColumn)[keyof typeof AnalyticsOperationColumn]; diff --git a/src/api/types/AnalyticsOperationOperation.ts b/src/api/types/AnalyticsOperationOperation.ts index d27cc64b..120246fb 100644 --- a/src/api/types/AnalyticsOperationOperation.ts +++ b/src/api/types/AnalyticsOperationOperation.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the aggregation operation you want to perform. - */ -export type AnalyticsOperationOperation = "sum" | "avg" | "count" | "min" | "max" | "history"; +/** This is the aggregation operation you want to perform. */ export const AnalyticsOperationOperation = { Sum: "sum", Avg: "avg", @@ -14,3 +9,5 @@ export const AnalyticsOperationOperation = { Max: "max", History: "history", } as const; +export type AnalyticsOperationOperation = + (typeof AnalyticsOperationOperation)[keyof typeof AnalyticsOperationOperation]; diff --git a/src/api/types/AnalyticsQuery.ts b/src/api/types/AnalyticsQuery.ts index 6d6c8484..1de9785f 100644 --- a/src/api/types/AnalyticsQuery.ts +++ b/src/api/types/AnalyticsQuery.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AnalyticsQuery { /** This is the table you want to query. */ diff --git a/src/api/types/AnalyticsQueryGroupByItem.ts b/src/api/types/AnalyticsQueryGroupByItem.ts index 80f50ae3..76bcff8e 100644 --- a/src/api/types/AnalyticsQueryGroupByItem.ts +++ b/src/api/types/AnalyticsQueryGroupByItem.ts @@ -1,13 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AnalyticsQueryGroupByItem = - | "type" - | "assistantId" - | "endedReason" - | "analysis.successEvaluation" - | "status"; export const AnalyticsQueryGroupByItem = { Type: "type", AssistantId: "assistantId", @@ -15,3 +7,4 @@ export const AnalyticsQueryGroupByItem = { AnalysisSuccessEvaluation: "analysis.successEvaluation", Status: "status", } as const; +export type AnalyticsQueryGroupByItem = (typeof AnalyticsQueryGroupByItem)[keyof typeof AnalyticsQueryGroupByItem]; diff --git a/src/api/types/AnalyticsQueryResult.ts b/src/api/types/AnalyticsQueryResult.ts index ff27a664..8889fb3a 100644 --- a/src/api/types/AnalyticsQueryResult.ts +++ b/src/api/types/AnalyticsQueryResult.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AnalyticsQueryResult { /** This is the unique key for the query. */ diff --git a/src/api/types/AnalyticsQueryTable.ts b/src/api/types/AnalyticsQueryTable.ts index 0df39327..ba95dfdf 100644 --- a/src/api/types/AnalyticsQueryTable.ts +++ b/src/api/types/AnalyticsQueryTable.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the table you want to query. - */ -export type AnalyticsQueryTable = "call" | "subscription"; +/** This is the table you want to query. */ export const AnalyticsQueryTable = { Call: "call", Subscription: "subscription", } as const; +export type AnalyticsQueryTable = (typeof AnalyticsQueryTable)[keyof typeof AnalyticsQueryTable]; diff --git a/src/api/types/AnthropicCredential.ts b/src/api/types/AnthropicCredential.ts index d7f0f0d5..e0c3289a 100644 --- a/src/api/types/AnthropicCredential.ts +++ b/src/api/types/AnthropicCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface AnthropicCredential { - provider: "anthropic"; + provider: Vapi.AnthropicCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/AnthropicCredentialProvider.ts b/src/api/types/AnthropicCredentialProvider.ts new file mode 100644 index 00000000..f64fbdbe --- /dev/null +++ b/src/api/types/AnthropicCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AnthropicCredentialProvider = { + Anthropic: "anthropic", +} as const; +export type AnthropicCredentialProvider = + (typeof AnthropicCredentialProvider)[keyof typeof AnthropicCredentialProvider]; diff --git a/src/api/types/AnthropicModel.ts b/src/api/types/AnthropicModel.ts index a4f0b0fc..59c46d3b 100644 --- a/src/api/types/AnthropicModel.ts +++ b/src/api/types/AnthropicModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AnthropicModel { /** This is the starting state for the conversation. */ @@ -24,7 +22,7 @@ export interface AnthropicModel { /** The specific Anthropic/Claude model that will be used. */ model: Vapi.AnthropicModelModel; /** The provider identifier for Anthropic. */ - provider: "anthropic"; + provider: Vapi.AnthropicModelProvider; /** * Optional configuration for Anthropic's thinking feature. * Only applicable for claude-3-7-sonnet-20250219 model. diff --git a/src/api/types/AnthropicModelModel.ts b/src/api/types/AnthropicModelModel.ts index 8ab1ab38..b76e8129 100644 --- a/src/api/types/AnthropicModelModel.ts +++ b/src/api/types/AnthropicModelModel.ts @@ -1,22 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The specific Anthropic/Claude model that will be used. - */ -export type AnthropicModelModel = - | "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-sonnet-4-20250514" - | "claude-sonnet-4-5-20250929" - | "claude-haiku-4-5-20251001"; +/** The specific Anthropic/Claude model that will be used. */ export const AnthropicModelModel = { Claude3Opus20240229: "claude-3-opus-20240229", Claude3Sonnet20240229: "claude-3-sonnet-20240229", @@ -30,3 +14,4 @@ export const AnthropicModelModel = { ClaudeSonnet4520250929: "claude-sonnet-4-5-20250929", ClaudeHaiku4520251001: "claude-haiku-4-5-20251001", } as const; +export type AnthropicModelModel = (typeof AnthropicModelModel)[keyof typeof AnthropicModelModel]; diff --git a/src/api/types/AnthropicModelProvider.ts b/src/api/types/AnthropicModelProvider.ts new file mode 100644 index 00000000..ec235838 --- /dev/null +++ b/src/api/types/AnthropicModelProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The provider identifier for Anthropic. */ +export const AnthropicModelProvider = { + Anthropic: "anthropic", +} as const; +export type AnthropicModelProvider = (typeof AnthropicModelProvider)[keyof typeof AnthropicModelProvider]; diff --git a/src/api/types/AnthropicModelToolsItem.ts b/src/api/types/AnthropicModelToolsItem.ts index c585ce36..eb552239 100644 --- a/src/api/types/AnthropicModelToolsItem.ts +++ b/src/api/types/AnthropicModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type AnthropicModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/AnthropicThinkingConfig.ts b/src/api/types/AnthropicThinkingConfig.ts index fa016f14..d8bebfad 100644 --- a/src/api/types/AnthropicThinkingConfig.ts +++ b/src/api/types/AnthropicThinkingConfig.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface AnthropicThinkingConfig { - type: "enabled"; + type: Vapi.AnthropicThinkingConfigType; /** * The maximum number of tokens to allocate for thinking. * Must be between 1024 and 100000 tokens. diff --git a/src/api/types/AnthropicThinkingConfigType.ts b/src/api/types/AnthropicThinkingConfigType.ts new file mode 100644 index 00000000..99b612f7 --- /dev/null +++ b/src/api/types/AnthropicThinkingConfigType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AnthropicThinkingConfigType = { + Enabled: "enabled", +} as const; +export type AnthropicThinkingConfigType = + (typeof AnthropicThinkingConfigType)[keyof typeof AnthropicThinkingConfigType]; diff --git a/src/api/types/AnyscaleCredential.ts b/src/api/types/AnyscaleCredential.ts index ead2e5f0..fbeb2392 100644 --- a/src/api/types/AnyscaleCredential.ts +++ b/src/api/types/AnyscaleCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface AnyscaleCredential { - provider: "anyscale"; + provider: Vapi.AnyscaleCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/AnyscaleCredentialProvider.ts b/src/api/types/AnyscaleCredentialProvider.ts new file mode 100644 index 00000000..0b7d8ddc --- /dev/null +++ b/src/api/types/AnyscaleCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AnyscaleCredentialProvider = { + Anyscale: "anyscale", +} as const; +export type AnyscaleCredentialProvider = (typeof AnyscaleCredentialProvider)[keyof typeof AnyscaleCredentialProvider]; diff --git a/src/api/types/AnyscaleModel.ts b/src/api/types/AnyscaleModel.ts index 8f2c97f1..2d02005d 100644 --- a/src/api/types/AnyscaleModel.ts +++ b/src/api/types/AnyscaleModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AnyscaleModel { /** This is the starting state for the conversation. */ @@ -21,7 +19,7 @@ export interface AnyscaleModel { toolIds?: string[]; /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; - provider: "anyscale"; + provider: Vapi.AnyscaleModelProvider; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: string; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ diff --git a/src/api/types/AnyscaleModelProvider.ts b/src/api/types/AnyscaleModelProvider.ts new file mode 100644 index 00000000..d69707c6 --- /dev/null +++ b/src/api/types/AnyscaleModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AnyscaleModelProvider = { + Anyscale: "anyscale", +} as const; +export type AnyscaleModelProvider = (typeof AnyscaleModelProvider)[keyof typeof AnyscaleModelProvider]; diff --git a/src/api/types/AnyscaleModelToolsItem.ts b/src/api/types/AnyscaleModelToolsItem.ts index a3a81aa0..beafa2fb 100644 --- a/src/api/types/AnyscaleModelToolsItem.ts +++ b/src/api/types/AnyscaleModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type AnyscaleModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/ApiRequestTool.ts b/src/api/types/ApiRequestTool.ts index 65bf08b0..48afa101 100644 --- a/src/api/types/ApiRequestTool.ts +++ b/src/api/types/ApiRequestTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ApiRequestTool { /** diff --git a/src/api/types/ApiRequestToolMessagesItem.ts b/src/api/types/ApiRequestToolMessagesItem.ts index 04dd6f16..8ba5d4cb 100644 --- a/src/api/types/ApiRequestToolMessagesItem.ts +++ b/src/api/types/ApiRequestToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ApiRequestToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/ApiRequestToolMethod.ts b/src/api/types/ApiRequestToolMethod.ts index 0cf18d5e..6538f40b 100644 --- a/src/api/types/ApiRequestToolMethod.ts +++ b/src/api/types/ApiRequestToolMethod.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type ApiRequestToolMethod = "POST" | "GET" | "PUT" | "PATCH" | "DELETE"; export const ApiRequestToolMethod = { Post: "POST", Get: "GET", @@ -10,3 +7,4 @@ export const ApiRequestToolMethod = { Patch: "PATCH", Delete: "DELETE", } as const; +export type ApiRequestToolMethod = (typeof ApiRequestToolMethod)[keyof typeof ApiRequestToolMethod]; diff --git a/src/api/types/Artifact.ts b/src/api/types/Artifact.ts index e631d338..bb17f294 100644 --- a/src/api/types/Artifact.ts +++ b/src/api/types/Artifact.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Artifact { /** These are the messages that were spoken during the call. */ @@ -36,6 +34,13 @@ export interface Artifact { * To enable, set `assistant.artifactPlan.structuredOutputIds` with the IDs of the structured outputs you want to extract. */ structuredOutputs?: Record; + /** + * 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. + */ + scorecards?: Record; /** These are the transfer records from warm transfers, including destinations, transcripts, and status. */ transfers?: string[]; + /** This is when the structured outputs were last updated */ + structuredOutputsLastUpdatedAt?: string; } diff --git a/src/api/types/ArtifactMessagesItem.ts b/src/api/types/ArtifactMessagesItem.ts index 3bb36914..39bef3c0 100644 --- a/src/api/types/ArtifactMessagesItem.ts +++ b/src/api/types/ArtifactMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ArtifactMessagesItem = | Vapi.UserMessage diff --git a/src/api/types/ArtifactPlan.ts b/src/api/types/ArtifactPlan.ts index 3295bfdd..a9414054 100644 --- a/src/api/types/ArtifactPlan.ts +++ b/src/api/types/ArtifactPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ArtifactPlan { /** @@ -114,6 +112,16 @@ export interface ArtifactPlan { * The outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended. */ structuredOutputIds?: string[]; + /** + * This is an array of scorecard IDs 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. + */ + scorecardIds?: string[]; + /** + * 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. + */ + scorecards?: Vapi.CreateScorecardDto[]; /** * 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. * diff --git a/src/api/types/ArtifactPlanRecordingFormat.ts b/src/api/types/ArtifactPlanRecordingFormat.ts index a68123f4..302aa003 100644 --- a/src/api/types/ArtifactPlanRecordingFormat.ts +++ b/src/api/types/ArtifactPlanRecordingFormat.ts @@ -1,14 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This determines the format of the recording. Defaults to `wav;l16`. * * @default 'wav;l16' */ -export type ArtifactPlanRecordingFormat = "wav;l16" | "mp3"; export const ArtifactPlanRecordingFormat = { WavL16: "wav;l16", Mp3: "mp3", } as const; +export type ArtifactPlanRecordingFormat = + (typeof ArtifactPlanRecordingFormat)[keyof typeof ArtifactPlanRecordingFormat]; diff --git a/src/api/types/AssemblyAiCredential.ts b/src/api/types/AssemblyAiCredential.ts index a283c5de..ce0acc97 100644 --- a/src/api/types/AssemblyAiCredential.ts +++ b/src/api/types/AssemblyAiCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface AssemblyAiCredential { - provider: "assembly-ai"; + provider: Vapi.AssemblyAiCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/AssemblyAiCredentialProvider.ts b/src/api/types/AssemblyAiCredentialProvider.ts new file mode 100644 index 00000000..68c46de9 --- /dev/null +++ b/src/api/types/AssemblyAiCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AssemblyAiCredentialProvider = { + AssemblyAi: "assembly-ai", +} as const; +export type AssemblyAiCredentialProvider = + (typeof AssemblyAiCredentialProvider)[keyof typeof AssemblyAiCredentialProvider]; diff --git a/src/api/types/AssemblyAiTranscriber.ts b/src/api/types/AssemblyAiTranscriber.ts index 3fa13781..e91cc2aa 100644 --- a/src/api/types/AssemblyAiTranscriber.ts +++ b/src/api/types/AssemblyAiTranscriber.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssemblyAiTranscriber { /** This is the transcription provider that will be used. */ - provider: "assembly-ai"; + provider: Vapi.AssemblyAiTranscriberProvider; /** This is the language that will be set for the transcription. */ - language?: "en"; + language?: Vapi.AssemblyAiTranscriberLanguage; /** * Transcripts below this confidence threshold will be discarded. * diff --git a/src/api/types/AssemblyAiTranscriberLanguage.ts b/src/api/types/AssemblyAiTranscriberLanguage.ts new file mode 100644 index 00000000..f7164bf1 --- /dev/null +++ b/src/api/types/AssemblyAiTranscriberLanguage.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the language that will be set for the transcription. */ +export const AssemblyAiTranscriberLanguage = { + En: "en", +} as const; +export type AssemblyAiTranscriberLanguage = + (typeof AssemblyAiTranscriberLanguage)[keyof typeof AssemblyAiTranscriberLanguage]; diff --git a/src/api/types/AssemblyAiTranscriberProvider.ts b/src/api/types/AssemblyAiTranscriberProvider.ts new file mode 100644 index 00000000..f1348f44 --- /dev/null +++ b/src/api/types/AssemblyAiTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const AssemblyAiTranscriberProvider = { + AssemblyAi: "assembly-ai", +} as const; +export type AssemblyAiTranscriberProvider = + (typeof AssemblyAiTranscriberProvider)[keyof typeof AssemblyAiTranscriberProvider]; diff --git a/src/api/types/Assistant.ts b/src/api/types/Assistant.ts index 379e8376..177bf19f 100644 --- a/src/api/types/Assistant.ts +++ b/src/api/types/Assistant.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Assistant { /** These are the options for the assistant's transcriber. */ @@ -31,13 +29,12 @@ export interface Assistant { firstMessageMode?: Vapi.AssistantFirstMessageMode; /** * 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. + * By default, voicemail detection is disabled. */ voicemailDetection?: Vapi.AssistantVoicemailDetection; - /** 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. 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. */ clientMessages?: Vapi.AssistantClientMessagesItem[]; - /** 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. You can check the shape of the messages in ServerMessage schema. */ + /** 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. */ serverMessages?: Vapi.AssistantServerMessagesItem[]; /** * This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. diff --git a/src/api/types/AssistantBackgroundSound.ts b/src/api/types/AssistantBackgroundSound.ts index e2c8f5e6..2cd3696a 100644 --- a/src/api/types/AssistantBackgroundSound.ts +++ b/src/api/types/AssistantBackgroundSound.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. diff --git a/src/api/types/AssistantBackgroundSoundZero.ts b/src/api/types/AssistantBackgroundSoundZero.ts index ac69bdff..14b00577 100644 --- a/src/api/types/AssistantBackgroundSoundZero.ts +++ b/src/api/types/AssistantBackgroundSoundZero.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AssistantBackgroundSoundZero = "off" | "office"; export const AssistantBackgroundSoundZero = { Off: "off", Office: "office", } as const; +export type AssistantBackgroundSoundZero = + (typeof AssistantBackgroundSoundZero)[keyof typeof AssistantBackgroundSoundZero]; diff --git a/src/api/types/AssistantClientMessagesItem.ts b/src/api/types/AssistantClientMessagesItem.ts index c6fd6e02..68a7f684 100644 --- a/src/api/types/AssistantClientMessagesItem.ts +++ b/src/api/types/AssistantClientMessagesItem.ts @@ -1,25 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AssistantClientMessagesItem = - | "conversation-update" - | "function-call" - | "function-call-result" - | "hang" - | "language-changed" - | "metadata" - | "model-output" - | "speech-update" - | "status-update" - | "transcript" - | "tool-calls" - | "tool-calls-result" - | "tool.completed" - | "transfer-update" - | "user-interrupted" - | "voice-input" - | "workflow.node.started"; export const AssistantClientMessagesItem = { ConversationUpdate: "conversation-update", FunctionCall: "function-call", @@ -38,4 +18,7 @@ export const AssistantClientMessagesItem = { UserInterrupted: "user-interrupted", VoiceInput: "voice-input", WorkflowNodeStarted: "workflow.node.started", + AssistantStarted: "assistant.started", } as const; +export type AssistantClientMessagesItem = + (typeof AssistantClientMessagesItem)[keyof typeof AssistantClientMessagesItem]; diff --git a/src/api/types/AssistantCredentialsItem.ts b/src/api/types/AssistantCredentialsItem.ts index bc78d8dd..5ab26c02 100644 --- a/src/api/types/AssistantCredentialsItem.ts +++ b/src/api/types/AssistantCredentialsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type AssistantCredentialsItem = | Vapi.CreateElevenLabsCredentialDto diff --git a/src/api/types/AssistantCustomEndpointingRule.ts b/src/api/types/AssistantCustomEndpointingRule.ts index b3f9d235..ffabefa4 100644 --- a/src/api/types/AssistantCustomEndpointingRule.ts +++ b/src/api/types/AssistantCustomEndpointingRule.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantCustomEndpointingRule { /** @@ -19,7 +17,7 @@ export interface AssistantCustomEndpointingRule { * - If you have yes/no questions in your use case like "are you interested in a loan?", you can set a shorter timeout. * - 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. */ - type: "assistant"; + type: Vapi.AssistantCustomEndpointingRuleType; /** * This is the regex pattern to match. * diff --git a/src/api/types/AssistantCustomEndpointingRuleType.ts b/src/api/types/AssistantCustomEndpointingRuleType.ts new file mode 100644 index 00000000..57f6a41b --- /dev/null +++ b/src/api/types/AssistantCustomEndpointingRuleType.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This endpointing rule is based on the last assistant message before customer started speaking. + * + * Flow: + * - Assistant speaks + * - Customer starts speaking + * - Customer transcription comes in + * - This rule is evaluated on the last assistant message + * - If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds` + * + * Usage: + * - If you have yes/no questions in your use case like "are you interested in a loan?", you can set a shorter timeout. + * - 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. + */ +export const AssistantCustomEndpointingRuleType = { + Assistant: "assistant", +} as const; +export type AssistantCustomEndpointingRuleType = + (typeof AssistantCustomEndpointingRuleType)[keyof typeof AssistantCustomEndpointingRuleType]; diff --git a/src/api/types/AssistantFirstMessageMode.ts b/src/api/types/AssistantFirstMessageMode.ts index ca182399..b25a37f7 100644 --- a/src/api/types/AssistantFirstMessageMode.ts +++ b/src/api/types/AssistantFirstMessageMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the mode for the first message. Default is 'assistant-speaks-first'. @@ -12,12 +10,9 @@ * * @default 'assistant-speaks-first' */ -export type AssistantFirstMessageMode = - | "assistant-speaks-first" - | "assistant-speaks-first-with-model-generated-message" - | "assistant-waits-for-user"; export const AssistantFirstMessageMode = { AssistantSpeaksFirst: "assistant-speaks-first", AssistantSpeaksFirstWithModelGeneratedMessage: "assistant-speaks-first-with-model-generated-message", AssistantWaitsForUser: "assistant-waits-for-user", } as const; +export type AssistantFirstMessageMode = (typeof AssistantFirstMessageMode)[keyof typeof AssistantFirstMessageMode]; diff --git a/src/api/types/AssistantHookAssistantSpeechInterrupted.ts b/src/api/types/AssistantHookAssistantSpeechInterrupted.ts index 9a11657d..28185de9 100644 --- a/src/api/types/AssistantHookAssistantSpeechInterrupted.ts +++ b/src/api/types/AssistantHookAssistantSpeechInterrupted.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type AssistantHookAssistantSpeechInterrupted = unknown; diff --git a/src/api/types/AssistantHookCallEnding.ts b/src/api/types/AssistantHookCallEnding.ts index d79e96fa..643d3496 100644 --- a/src/api/types/AssistantHookCallEnding.ts +++ b/src/api/types/AssistantHookCallEnding.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type AssistantHookCallEnding = unknown; diff --git a/src/api/types/AssistantHookCustomerSpeechInterrupted.ts b/src/api/types/AssistantHookCustomerSpeechInterrupted.ts index 5a4c973b..abeea51f 100644 --- a/src/api/types/AssistantHookCustomerSpeechInterrupted.ts +++ b/src/api/types/AssistantHookCustomerSpeechInterrupted.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type AssistantHookCustomerSpeechInterrupted = unknown; diff --git a/src/api/types/AssistantHooksItem.ts b/src/api/types/AssistantHooksItem.ts index ccd75140..d530d896 100644 --- a/src/api/types/AssistantHooksItem.ts +++ b/src/api/types/AssistantHooksItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type AssistantHooksItem = | Vapi.CallHookCallEnding diff --git a/src/api/types/AssistantMessage.ts b/src/api/types/AssistantMessage.ts index fb4f608e..be00bd5e 100644 --- a/src/api/types/AssistantMessage.ts +++ b/src/api/types/AssistantMessage.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantMessage { /** This is the role of the message author */ - role: "assistant"; + role: Vapi.AssistantMessageRole; /** This is the content of the assistant message */ content?: string; /** This is the refusal message generated by the model */ diff --git a/src/api/types/AssistantMessageEvaluationContinuePlan.ts b/src/api/types/AssistantMessageEvaluationContinuePlan.ts index 7859617f..33f07b84 100644 --- a/src/api/types/AssistantMessageEvaluationContinuePlan.ts +++ b/src/api/types/AssistantMessageEvaluationContinuePlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantMessageEvaluationContinuePlan { /** diff --git a/src/api/types/AssistantMessageJudgePlanAi.ts b/src/api/types/AssistantMessageJudgePlanAi.ts index 66ca478d..4e311197 100644 --- a/src/api/types/AssistantMessageJudgePlanAi.ts +++ b/src/api/types/AssistantMessageJudgePlanAi.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantMessageJudgePlanAi { /** @@ -21,5 +19,5 @@ export interface AssistantMessageJudgePlanAi { * Use 'ai' to evaluate the assistant message content using LLM-as-a-judge. * @default 'ai' */ - type: "ai"; + type: Vapi.AssistantMessageJudgePlanAiType; } diff --git a/src/api/types/AssistantMessageJudgePlanAiModel.ts b/src/api/types/AssistantMessageJudgePlanAiModel.ts index cf8b6d36..bd514a9a 100644 --- a/src/api/types/AssistantMessageJudgePlanAiModel.ts +++ b/src/api/types/AssistantMessageJudgePlanAiModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the model to use for the LLM-as-a-judge. diff --git a/src/api/types/AssistantMessageJudgePlanAiType.ts b/src/api/types/AssistantMessageJudgePlanAiType.ts new file mode 100644 index 00000000..5f6afd96 --- /dev/null +++ b/src/api/types/AssistantMessageJudgePlanAiType.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the judge plan. + * Use 'ai' to evaluate the assistant message content using LLM-as-a-judge. + * @default 'ai' + */ +export const AssistantMessageJudgePlanAiType = { + Ai: "ai", +} as const; +export type AssistantMessageJudgePlanAiType = + (typeof AssistantMessageJudgePlanAiType)[keyof typeof AssistantMessageJudgePlanAiType]; diff --git a/src/api/types/AssistantMessageJudgePlanExact.ts b/src/api/types/AssistantMessageJudgePlanExact.ts index 36478b74..a2708600 100644 --- a/src/api/types/AssistantMessageJudgePlanExact.ts +++ b/src/api/types/AssistantMessageJudgePlanExact.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantMessageJudgePlanExact { /** @@ -10,7 +8,7 @@ export interface AssistantMessageJudgePlanExact { * Use 'exact' for an exact match on the content and tool calls - without using LLM-as-a-judge. * @default 'exact' */ - type: "exact"; + type: Vapi.AssistantMessageJudgePlanExactType; /** * 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. diff --git a/src/api/types/AssistantMessageJudgePlanExactType.ts b/src/api/types/AssistantMessageJudgePlanExactType.ts new file mode 100644 index 00000000..9efd021a --- /dev/null +++ b/src/api/types/AssistantMessageJudgePlanExactType.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the judge plan. + * Use 'exact' for an exact match on the content and tool calls - without using LLM-as-a-judge. + * @default 'exact' + */ +export const AssistantMessageJudgePlanExactType = { + Exact: "exact", +} as const; +export type AssistantMessageJudgePlanExactType = + (typeof AssistantMessageJudgePlanExactType)[keyof typeof AssistantMessageJudgePlanExactType]; diff --git a/src/api/types/AssistantMessageJudgePlanRegex.ts b/src/api/types/AssistantMessageJudgePlanRegex.ts index c3bfb8b8..f593983e 100644 --- a/src/api/types/AssistantMessageJudgePlanRegex.ts +++ b/src/api/types/AssistantMessageJudgePlanRegex.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantMessageJudgePlanRegex { /** @@ -10,7 +8,7 @@ export interface AssistantMessageJudgePlanRegex { * Use 'regex' for a regex match on the content and tool calls - without using LLM-as-a-judge. * @default 'regex' */ - type: "regex"; + type: Vapi.AssistantMessageJudgePlanRegexType; /** * 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. diff --git a/src/api/types/AssistantMessageJudgePlanRegexType.ts b/src/api/types/AssistantMessageJudgePlanRegexType.ts new file mode 100644 index 00000000..79f0ab5d --- /dev/null +++ b/src/api/types/AssistantMessageJudgePlanRegexType.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the judge plan. + * Use 'regex' for a regex match on the content and tool calls - without using LLM-as-a-judge. + * @default 'regex' + */ +export const AssistantMessageJudgePlanRegexType = { + Regex: "regex", +} as const; +export type AssistantMessageJudgePlanRegexType = + (typeof AssistantMessageJudgePlanRegexType)[keyof typeof AssistantMessageJudgePlanRegexType]; diff --git a/src/api/types/AssistantMessageRole.ts b/src/api/types/AssistantMessageRole.ts new file mode 100644 index 00000000..e5523ed5 --- /dev/null +++ b/src/api/types/AssistantMessageRole.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the role of the message author */ +export const AssistantMessageRole = { + Assistant: "assistant", +} as const; +export type AssistantMessageRole = (typeof AssistantMessageRole)[keyof typeof AssistantMessageRole]; diff --git a/src/api/types/AssistantModel.ts b/src/api/types/AssistantModel.ts index 01064016..b64159e3 100644 --- a/src/api/types/AssistantModel.ts +++ b/src/api/types/AssistantModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's LLM. diff --git a/src/api/types/AssistantOverrides.ts b/src/api/types/AssistantOverrides.ts index 3fcc2fa4..855b9cef 100644 --- a/src/api/types/AssistantOverrides.ts +++ b/src/api/types/AssistantOverrides.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantOverrides { /** These are the options for the assistant's transcriber. */ @@ -31,13 +29,12 @@ export interface AssistantOverrides { firstMessageMode?: Vapi.AssistantOverridesFirstMessageMode; /** * 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. + * By default, voicemail detection is disabled. */ voicemailDetection?: Vapi.AssistantOverridesVoicemailDetection; - /** 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. 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. */ clientMessages?: Vapi.AssistantOverridesClientMessagesItem[]; - /** 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. You can check the shape of the messages in ServerMessage schema. */ + /** 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. */ serverMessages?: Vapi.AssistantOverridesServerMessagesItem[]; /** * This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. diff --git a/src/api/types/AssistantOverridesBackgroundSound.ts b/src/api/types/AssistantOverridesBackgroundSound.ts index 66847734..defd0864 100644 --- a/src/api/types/AssistantOverridesBackgroundSound.ts +++ b/src/api/types/AssistantOverridesBackgroundSound.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. diff --git a/src/api/types/AssistantOverridesBackgroundSoundZero.ts b/src/api/types/AssistantOverridesBackgroundSoundZero.ts index d8a0c4d9..da0c98c0 100644 --- a/src/api/types/AssistantOverridesBackgroundSoundZero.ts +++ b/src/api/types/AssistantOverridesBackgroundSoundZero.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AssistantOverridesBackgroundSoundZero = "off" | "office"; export const AssistantOverridesBackgroundSoundZero = { Off: "off", Office: "office", } as const; +export type AssistantOverridesBackgroundSoundZero = + (typeof AssistantOverridesBackgroundSoundZero)[keyof typeof AssistantOverridesBackgroundSoundZero]; diff --git a/src/api/types/AssistantOverridesClientMessagesItem.ts b/src/api/types/AssistantOverridesClientMessagesItem.ts index 4c205aac..2e991481 100644 --- a/src/api/types/AssistantOverridesClientMessagesItem.ts +++ b/src/api/types/AssistantOverridesClientMessagesItem.ts @@ -1,25 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AssistantOverridesClientMessagesItem = - | "conversation-update" - | "function-call" - | "function-call-result" - | "hang" - | "language-changed" - | "metadata" - | "model-output" - | "speech-update" - | "status-update" - | "transcript" - | "tool-calls" - | "tool-calls-result" - | "tool.completed" - | "transfer-update" - | "user-interrupted" - | "voice-input" - | "workflow.node.started"; export const AssistantOverridesClientMessagesItem = { ConversationUpdate: "conversation-update", FunctionCall: "function-call", @@ -38,4 +18,7 @@ export const AssistantOverridesClientMessagesItem = { UserInterrupted: "user-interrupted", VoiceInput: "voice-input", WorkflowNodeStarted: "workflow.node.started", + AssistantStarted: "assistant.started", } as const; +export type AssistantOverridesClientMessagesItem = + (typeof AssistantOverridesClientMessagesItem)[keyof typeof AssistantOverridesClientMessagesItem]; diff --git a/src/api/types/AssistantOverridesCredentialsItem.ts b/src/api/types/AssistantOverridesCredentialsItem.ts index 2f1ea0db..5738701c 100644 --- a/src/api/types/AssistantOverridesCredentialsItem.ts +++ b/src/api/types/AssistantOverridesCredentialsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type AssistantOverridesCredentialsItem = | Vapi.CreateElevenLabsCredentialDto diff --git a/src/api/types/AssistantOverridesFirstMessageMode.ts b/src/api/types/AssistantOverridesFirstMessageMode.ts index 7e246df5..c8e78ad1 100644 --- a/src/api/types/AssistantOverridesFirstMessageMode.ts +++ b/src/api/types/AssistantOverridesFirstMessageMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the mode for the first message. Default is 'assistant-speaks-first'. @@ -12,12 +10,10 @@ * * @default 'assistant-speaks-first' */ -export type AssistantOverridesFirstMessageMode = - | "assistant-speaks-first" - | "assistant-speaks-first-with-model-generated-message" - | "assistant-waits-for-user"; export const AssistantOverridesFirstMessageMode = { AssistantSpeaksFirst: "assistant-speaks-first", AssistantSpeaksFirstWithModelGeneratedMessage: "assistant-speaks-first-with-model-generated-message", AssistantWaitsForUser: "assistant-waits-for-user", } as const; +export type AssistantOverridesFirstMessageMode = + (typeof AssistantOverridesFirstMessageMode)[keyof typeof AssistantOverridesFirstMessageMode]; diff --git a/src/api/types/AssistantOverridesHooksItem.ts b/src/api/types/AssistantOverridesHooksItem.ts index f68dc797..b5e0e968 100644 --- a/src/api/types/AssistantOverridesHooksItem.ts +++ b/src/api/types/AssistantOverridesHooksItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type AssistantOverridesHooksItem = | Vapi.CallHookCallEnding diff --git a/src/api/types/AssistantOverridesModel.ts b/src/api/types/AssistantOverridesModel.ts index 7c4df335..dbc6cf0a 100644 --- a/src/api/types/AssistantOverridesModel.ts +++ b/src/api/types/AssistantOverridesModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's LLM. diff --git a/src/api/types/AssistantOverridesServerMessagesItem.ts b/src/api/types/AssistantOverridesServerMessagesItem.ts index 85093a48..b390363f 100644 --- a/src/api/types/AssistantOverridesServerMessagesItem.ts +++ b/src/api/types/AssistantOverridesServerMessagesItem.ts @@ -1,34 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AssistantOverridesServerMessagesItem = - | "conversation-update" - | "end-of-call-report" - | "function-call" - | "hang" - | "language-changed" - | "language-change-detected" - | "model-output" - | "phone-call-control" - | "speech-update" - | "status-update" - | "transcript" - | 'transcript[transcriptType="final"]' - | "tool-calls" - | "transfer-destination-request" - | "handoff-destination-request" - | "transfer-update" - | "user-interrupted" - | "voice-input" - | "chat.created" - | "chat.deleted" - | "session.created" - | "session.updated" - | "session.deleted" - | "call.deleted" - | "call.delete.failed"; export const AssistantOverridesServerMessagesItem = { + AssistantStarted: "assistant.started", ConversationUpdate: "conversation-update", EndOfCallReport: "end-of-call-report", FunctionCall: "function-call", @@ -55,3 +28,5 @@ export const AssistantOverridesServerMessagesItem = { CallDeleted: "call.deleted", CallDeleteFailed: "call.delete.failed", } as const; +export type AssistantOverridesServerMessagesItem = + (typeof AssistantOverridesServerMessagesItem)[keyof typeof AssistantOverridesServerMessagesItem]; diff --git a/src/api/types/AssistantOverridesToolsAppendItem.ts b/src/api/types/AssistantOverridesToolsAppendItem.ts index 4117c0cd..459977be 100644 --- a/src/api/types/AssistantOverridesToolsAppendItem.ts +++ b/src/api/types/AssistantOverridesToolsAppendItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type AssistantOverridesToolsAppendItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/AssistantOverridesTranscriber.ts b/src/api/types/AssistantOverridesTranscriber.ts index 8ed7602f..1ae6a149 100644 --- a/src/api/types/AssistantOverridesTranscriber.ts +++ b/src/api/types/AssistantOverridesTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's transcriber. diff --git a/src/api/types/AssistantOverridesVoice.ts b/src/api/types/AssistantOverridesVoice.ts index c52966cd..b8ef07a0 100644 --- a/src/api/types/AssistantOverridesVoice.ts +++ b/src/api/types/AssistantOverridesVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's voice. diff --git a/src/api/types/AssistantOverridesVoicemailDetection.ts b/src/api/types/AssistantOverridesVoicemailDetection.ts index e99b3cdb..1e0c8a76 100644 --- a/src/api/types/AssistantOverridesVoicemailDetection.ts +++ b/src/api/types/AssistantOverridesVoicemailDetection.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * 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. + * By default, voicemail detection is disabled. */ export type AssistantOverridesVoicemailDetection = + | Vapi.AssistantOverridesVoicemailDetectionZero | Vapi.GoogleVoicemailDetectionPlan | Vapi.OpenAiVoicemailDetectionPlan | Vapi.TwilioVoicemailDetectionPlan diff --git a/src/api/types/AssistantOverridesVoicemailDetectionZero.ts b/src/api/types/AssistantOverridesVoicemailDetectionZero.ts new file mode 100644 index 00000000..3b0c4757 --- /dev/null +++ b/src/api/types/AssistantOverridesVoicemailDetectionZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AssistantOverridesVoicemailDetectionZero = { + Off: "off", +} as const; +export type AssistantOverridesVoicemailDetectionZero = + (typeof AssistantOverridesVoicemailDetectionZero)[keyof typeof AssistantOverridesVoicemailDetectionZero]; diff --git a/src/api/types/AssistantPaginatedResponse.ts b/src/api/types/AssistantPaginatedResponse.ts index 8bab7229..c9dc2838 100644 --- a/src/api/types/AssistantPaginatedResponse.ts +++ b/src/api/types/AssistantPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantPaginatedResponse { results: Vapi.Assistant[]; diff --git a/src/api/types/AssistantServerMessagesItem.ts b/src/api/types/AssistantServerMessagesItem.ts index 7187d833..8162bfda 100644 --- a/src/api/types/AssistantServerMessagesItem.ts +++ b/src/api/types/AssistantServerMessagesItem.ts @@ -1,34 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AssistantServerMessagesItem = - | "conversation-update" - | "end-of-call-report" - | "function-call" - | "hang" - | "language-changed" - | "language-change-detected" - | "model-output" - | "phone-call-control" - | "speech-update" - | "status-update" - | "transcript" - | 'transcript[transcriptType="final"]' - | "tool-calls" - | "transfer-destination-request" - | "handoff-destination-request" - | "transfer-update" - | "user-interrupted" - | "voice-input" - | "chat.created" - | "chat.deleted" - | "session.created" - | "session.updated" - | "session.deleted" - | "call.deleted" - | "call.delete.failed"; export const AssistantServerMessagesItem = { + AssistantStarted: "assistant.started", ConversationUpdate: "conversation-update", EndOfCallReport: "end-of-call-report", FunctionCall: "function-call", @@ -55,3 +28,5 @@ export const AssistantServerMessagesItem = { CallDeleted: "call.deleted", CallDeleteFailed: "call.delete.failed", } as const; +export type AssistantServerMessagesItem = + (typeof AssistantServerMessagesItem)[keyof typeof AssistantServerMessagesItem]; diff --git a/src/api/types/AssistantTranscriber.ts b/src/api/types/AssistantTranscriber.ts index 0c602005..4fb889fe 100644 --- a/src/api/types/AssistantTranscriber.ts +++ b/src/api/types/AssistantTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's transcriber. diff --git a/src/api/types/AssistantUserEditable.ts b/src/api/types/AssistantUserEditable.ts index a32ba3e7..25558c34 100644 --- a/src/api/types/AssistantUserEditable.ts +++ b/src/api/types/AssistantUserEditable.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface AssistantUserEditable { serverMessages?: unknown; diff --git a/src/api/types/AssistantVersionPaginatedResponse.ts b/src/api/types/AssistantVersionPaginatedResponse.ts index 1f4d9624..e0f8cd18 100644 --- a/src/api/types/AssistantVersionPaginatedResponse.ts +++ b/src/api/types/AssistantVersionPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AssistantVersionPaginatedResponse { results: unknown[]; diff --git a/src/api/types/AssistantVoice.ts b/src/api/types/AssistantVoice.ts index d3be78f1..84f1c03b 100644 --- a/src/api/types/AssistantVoice.ts +++ b/src/api/types/AssistantVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's voice. diff --git a/src/api/types/AssistantVoicemailDetection.ts b/src/api/types/AssistantVoicemailDetection.ts index 87dd82ae..d7e320a0 100644 --- a/src/api/types/AssistantVoicemailDetection.ts +++ b/src/api/types/AssistantVoicemailDetection.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * 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. + * By default, voicemail detection is disabled. */ export type AssistantVoicemailDetection = + | Vapi.AssistantVoicemailDetectionZero | Vapi.GoogleVoicemailDetectionPlan | Vapi.OpenAiVoicemailDetectionPlan | Vapi.TwilioVoicemailDetectionPlan diff --git a/src/api/types/AssistantVoicemailDetectionZero.ts b/src/api/types/AssistantVoicemailDetectionZero.ts new file mode 100644 index 00000000..ec636088 --- /dev/null +++ b/src/api/types/AssistantVoicemailDetectionZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AssistantVoicemailDetectionZero = { + Off: "off", +} as const; +export type AssistantVoicemailDetectionZero = + (typeof AssistantVoicemailDetectionZero)[keyof typeof AssistantVoicemailDetectionZero]; diff --git a/src/api/types/AutoReloadPlan.ts b/src/api/types/AutoReloadPlan.ts index bb57654c..64a57f39 100644 --- a/src/api/types/AutoReloadPlan.ts +++ b/src/api/types/AutoReloadPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface AutoReloadPlan { /** This the amount of credits to reload. */ diff --git a/src/api/types/AzureBlobStorageBucketPlan.ts b/src/api/types/AzureBlobStorageBucketPlan.ts index aa6e3509..bce70fdb 100644 --- a/src/api/types/AzureBlobStorageBucketPlan.ts +++ b/src/api/types/AzureBlobStorageBucketPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface AzureBlobStorageBucketPlan { /** This is the blob storage connection string for the Azure resource. */ diff --git a/src/api/types/AzureCredential.ts b/src/api/types/AzureCredential.ts index f4e96003..0deb3acf 100644 --- a/src/api/types/AzureCredential.ts +++ b/src/api/types/AzureCredential.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AzureCredential { - provider: "azure"; + provider: Vapi.AzureCredentialProvider; /** This is the service being used in Azure. */ service: Vapi.AzureCredentialService; /** This is the region of the Azure resource. */ diff --git a/src/api/types/AzureCredentialProvider.ts b/src/api/types/AzureCredentialProvider.ts new file mode 100644 index 00000000..4426b3c0 --- /dev/null +++ b/src/api/types/AzureCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AzureCredentialProvider = { + Azure: "azure", +} as const; +export type AzureCredentialProvider = (typeof AzureCredentialProvider)[keyof typeof AzureCredentialProvider]; diff --git a/src/api/types/AzureCredentialRegion.ts b/src/api/types/AzureCredentialRegion.ts index aaa91951..24c8afe7 100644 --- a/src/api/types/AzureCredentialRegion.ts +++ b/src/api/types/AzureCredentialRegion.ts @@ -1,29 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the region of the Azure resource. - */ -export type AzureCredentialRegion = - | "australia" - | "canadaeast" - | "canadacentral" - | "eastus2" - | "eastus" - | "france" - | "india" - | "japaneast" - | "japanwest" - | "uaenorth" - | "northcentralus" - | "norway" - | "southcentralus" - | "swedencentral" - | "switzerland" - | "uk" - | "westus" - | "westus3"; +/** This is the region of the Azure resource. */ export const AzureCredentialRegion = { Australia: "australia", Canadaeast: "canadaeast", @@ -44,3 +21,4 @@ export const AzureCredentialRegion = { Westus: "westus", Westus3: "westus3", } as const; +export type AzureCredentialRegion = (typeof AzureCredentialRegion)[keyof typeof AzureCredentialRegion]; diff --git a/src/api/types/AzureCredentialService.ts b/src/api/types/AzureCredentialService.ts index 086f0e74..d8274e2b 100644 --- a/src/api/types/AzureCredentialService.ts +++ b/src/api/types/AzureCredentialService.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the service being used in Azure. - */ -export type AzureCredentialService = "speech" | "blob_storage"; +/** This is the service being used in Azure. */ export const AzureCredentialService = { Speech: "speech", BlobStorage: "blob_storage", } as const; +export type AzureCredentialService = (typeof AzureCredentialService)[keyof typeof AzureCredentialService]; diff --git a/src/api/types/AzureOpenAiCredential.ts b/src/api/types/AzureOpenAiCredential.ts index 001e114a..53ed60df 100644 --- a/src/api/types/AzureOpenAiCredential.ts +++ b/src/api/types/AzureOpenAiCredential.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AzureOpenAiCredential { - provider: "azure-openai"; + provider: Vapi.AzureOpenAiCredentialProvider; region: Vapi.AzureOpenAiCredentialRegion; models: Vapi.AzureOpenAiCredentialModelsItem[]; /** This is not returned in the API. */ diff --git a/src/api/types/AzureOpenAiCredentialModelsItem.ts b/src/api/types/AzureOpenAiCredentialModelsItem.ts index f9bc22b6..b57cb757 100644 --- a/src/api/types/AzureOpenAiCredentialModelsItem.ts +++ b/src/api/types/AzureOpenAiCredentialModelsItem.ts @@ -1,24 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AzureOpenAiCredentialModelsItem = - | "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" - | "gpt-4-0613" - | "gpt-35-turbo-0125" - | "gpt-35-turbo-1106"; export const AzureOpenAiCredentialModelsItem = { Gpt5: "gpt-5", Gpt5Mini: "gpt-5-mini", @@ -37,3 +18,5 @@ export const AzureOpenAiCredentialModelsItem = { Gpt35Turbo0125: "gpt-35-turbo-0125", Gpt35Turbo1106: "gpt-35-turbo-1106", } as const; +export type AzureOpenAiCredentialModelsItem = + (typeof AzureOpenAiCredentialModelsItem)[keyof typeof AzureOpenAiCredentialModelsItem]; diff --git a/src/api/types/AzureOpenAiCredentialProvider.ts b/src/api/types/AzureOpenAiCredentialProvider.ts new file mode 100644 index 00000000..1416f5df --- /dev/null +++ b/src/api/types/AzureOpenAiCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AzureOpenAiCredentialProvider = { + AzureOpenai: "azure-openai", +} as const; +export type AzureOpenAiCredentialProvider = + (typeof AzureOpenAiCredentialProvider)[keyof typeof AzureOpenAiCredentialProvider]; diff --git a/src/api/types/AzureOpenAiCredentialRegion.ts b/src/api/types/AzureOpenAiCredentialRegion.ts index 0b0b0788..374504df 100644 --- a/src/api/types/AzureOpenAiCredentialRegion.ts +++ b/src/api/types/AzureOpenAiCredentialRegion.ts @@ -1,26 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AzureOpenAiCredentialRegion = - | "australia" - | "canadaeast" - | "canadacentral" - | "eastus2" - | "eastus" - | "france" - | "india" - | "japaneast" - | "japanwest" - | "uaenorth" - | "northcentralus" - | "norway" - | "southcentralus" - | "swedencentral" - | "switzerland" - | "uk" - | "westus" - | "westus3"; export const AzureOpenAiCredentialRegion = { Australia: "australia", Canadaeast: "canadaeast", @@ -41,3 +20,5 @@ export const AzureOpenAiCredentialRegion = { Westus: "westus", Westus3: "westus3", } as const; +export type AzureOpenAiCredentialRegion = + (typeof AzureOpenAiCredentialRegion)[keyof typeof AzureOpenAiCredentialRegion]; diff --git a/src/api/types/AzureSpeechTranscriber.ts b/src/api/types/AzureSpeechTranscriber.ts index 37e6681e..62e5933a 100644 --- a/src/api/types/AzureSpeechTranscriber.ts +++ b/src/api/types/AzureSpeechTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AzureSpeechTranscriber { /** This is the transcription provider that will be used. */ - provider: "azure"; + provider: Vapi.AzureSpeechTranscriberProvider; /** 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 */ language?: Vapi.AzureSpeechTranscriberLanguage; /** Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation. */ diff --git a/src/api/types/AzureSpeechTranscriberLanguage.ts b/src/api/types/AzureSpeechTranscriberLanguage.ts index ee491348..6eead05c 100644 --- a/src/api/types/AzureSpeechTranscriberLanguage.ts +++ b/src/api/types/AzureSpeechTranscriberLanguage.ts @@ -1,154 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * 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 - */ -export type AzureSpeechTranscriberLanguage = - | "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"; +/** 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 */ export const AzureSpeechTranscriberLanguage = { AfZa: "af-ZA", AmEt: "am-ET", @@ -294,3 +146,5 @@ export const AzureSpeechTranscriberLanguage = { ZhTw: "zh-TW", ZuZa: "zu-ZA", } as const; +export type AzureSpeechTranscriberLanguage = + (typeof AzureSpeechTranscriberLanguage)[keyof typeof AzureSpeechTranscriberLanguage]; diff --git a/src/api/types/AzureSpeechTranscriberProvider.ts b/src/api/types/AzureSpeechTranscriberProvider.ts new file mode 100644 index 00000000..b60ad3e7 --- /dev/null +++ b/src/api/types/AzureSpeechTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const AzureSpeechTranscriberProvider = { + Azure: "azure", +} as const; +export type AzureSpeechTranscriberProvider = + (typeof AzureSpeechTranscriberProvider)[keyof typeof AzureSpeechTranscriberProvider]; diff --git a/src/api/types/AzureSpeechTranscriberSegmentationStrategy.ts b/src/api/types/AzureSpeechTranscriberSegmentationStrategy.ts index 22f957fb..d2bbe4ea 100644 --- a/src/api/types/AzureSpeechTranscriberSegmentationStrategy.ts +++ b/src/api/types/AzureSpeechTranscriberSegmentationStrategy.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation. - */ -export type AzureSpeechTranscriberSegmentationStrategy = "Default" | "Time" | "Semantic"; +/** Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation. */ export const AzureSpeechTranscriberSegmentationStrategy = { Default: "Default", Time: "Time", Semantic: "Semantic", } as const; +export type AzureSpeechTranscriberSegmentationStrategy = + (typeof AzureSpeechTranscriberSegmentationStrategy)[keyof typeof AzureSpeechTranscriberSegmentationStrategy]; diff --git a/src/api/types/AzureVoice.ts b/src/api/types/AzureVoice.ts index c745b0a0..7a7077e9 100644 --- a/src/api/types/AzureVoice.ts +++ b/src/api/types/AzureVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface AzureVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "azure"; + provider: Vapi.AzureVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.AzureVoiceId; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/AzureVoiceId.ts b/src/api/types/AzureVoiceId.ts index 7da23e7e..fb670242 100644 --- a/src/api/types/AzureVoiceId.ts +++ b/src/api/types/AzureVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/AzureVoiceIdEnum.ts b/src/api/types/AzureVoiceIdEnum.ts index 77b85333..34968dd1 100644 --- a/src/api/types/AzureVoiceIdEnum.ts +++ b/src/api/types/AzureVoiceIdEnum.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AzureVoiceIdEnum = "andrew" | "brian" | "emma"; export const AzureVoiceIdEnum = { Andrew: "andrew", Brian: "brian", Emma: "emma", } as const; +export type AzureVoiceIdEnum = (typeof AzureVoiceIdEnum)[keyof typeof AzureVoiceIdEnum]; diff --git a/src/api/types/AzureVoiceProvider.ts b/src/api/types/AzureVoiceProvider.ts new file mode 100644 index 00000000..b3ee68ae --- /dev/null +++ b/src/api/types/AzureVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const AzureVoiceProvider = { + Azure: "azure", +} as const; +export type AzureVoiceProvider = (typeof AzureVoiceProvider)[keyof typeof AzureVoiceProvider]; diff --git a/src/api/types/BackgroundSpeechDenoisingPlan.ts b/src/api/types/BackgroundSpeechDenoisingPlan.ts index 7a7fc88c..04e457dd 100644 --- a/src/api/types/BackgroundSpeechDenoisingPlan.ts +++ b/src/api/types/BackgroundSpeechDenoisingPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface BackgroundSpeechDenoisingPlan { /** Whether smart denoising using Krisp is enabled. */ diff --git a/src/api/types/BackoffPlan.ts b/src/api/types/BackoffPlan.ts index e2638f69..c49faf31 100644 --- a/src/api/types/BackoffPlan.ts +++ b/src/api/types/BackoffPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface BackoffPlan { /** diff --git a/src/api/types/BarInsight.ts b/src/api/types/BarInsight.ts new file mode 100644 index 00000000..b80a62f7 --- /dev/null +++ b/src/api/types/BarInsight.ts @@ -0,0 +1,46 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface BarInsight { + /** This is the name of the Insight. */ + name?: string; + type: "bar"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + /** This is the metadata for the insight. */ + metadata?: Vapi.BarInsightMetadata; + timeRange?: Vapi.InsightTimeRangeWithStep; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.BarInsightGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.BarInsightQueriesItem[]; + /** This is the unique identifier for the Insight. */ + id: string; + /** This is the unique identifier for the org that this Insight belongs to. */ + orgId: string; + /** This is the ISO 8601 date-time string of when the Insight was created. */ + createdAt: string; + /** This is the ISO 8601 date-time string of when the Insight was last updated. */ + updatedAt: string; +} diff --git a/src/api/types/BarInsightFromCallTable.ts b/src/api/types/BarInsightFromCallTable.ts new file mode 100644 index 00000000..68cbf1b3 --- /dev/null +++ b/src/api/types/BarInsightFromCallTable.ts @@ -0,0 +1,42 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface BarInsightFromCallTable { + /** This is the name of the Insight. */ + name?: string; + /** + * This is the type of the Insight. + * It is required to be `bar` to create a bar insight. + */ + type: Vapi.BarInsightFromCallTableType; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + /** This is the metadata for the insight. */ + metadata?: Vapi.BarInsightMetadata; + timeRange?: Vapi.InsightTimeRangeWithStep; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.BarInsightFromCallTableGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.BarInsightFromCallTableQueriesItem[]; +} diff --git a/src/api/types/BarInsightFromCallTableGroupBy.ts b/src/api/types/BarInsightFromCallTableGroupBy.ts new file mode 100644 index 00000000..6a40881f --- /dev/null +++ b/src/api/types/BarInsightFromCallTableGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const BarInsightFromCallTableGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type BarInsightFromCallTableGroupBy = + (typeof BarInsightFromCallTableGroupBy)[keyof typeof BarInsightFromCallTableGroupBy]; diff --git a/src/api/types/BarInsightFromCallTableQueriesItem.ts b/src/api/types/BarInsightFromCallTableQueriesItem.ts new file mode 100644 index 00000000..a5bc1998 --- /dev/null +++ b/src/api/types/BarInsightFromCallTableQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type BarInsightFromCallTableQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/BarInsightFromCallTableType.ts b/src/api/types/BarInsightFromCallTableType.ts new file mode 100644 index 00000000..40df7b07 --- /dev/null +++ b/src/api/types/BarInsightFromCallTableType.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the Insight. + * It is required to be `bar` to create a bar insight. + */ +export const BarInsightFromCallTableType = { + Bar: "bar", +} as const; +export type BarInsightFromCallTableType = + (typeof BarInsightFromCallTableType)[keyof typeof BarInsightFromCallTableType]; diff --git a/src/api/types/BarInsightGroupBy.ts b/src/api/types/BarInsightGroupBy.ts new file mode 100644 index 00000000..275662ff --- /dev/null +++ b/src/api/types/BarInsightGroupBy.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const BarInsightGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type BarInsightGroupBy = (typeof BarInsightGroupBy)[keyof typeof BarInsightGroupBy]; diff --git a/src/api/types/BarInsightMetadata.ts b/src/api/types/BarInsightMetadata.ts new file mode 100644 index 00000000..1e662b7c --- /dev/null +++ b/src/api/types/BarInsightMetadata.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface BarInsightMetadata { + xAxisLabel?: string; + yAxisLabel?: string; + yAxisMin?: number; + yAxisMax?: number; + name?: string; +} diff --git a/src/api/types/BarInsightQueriesItem.ts b/src/api/types/BarInsightQueriesItem.ts new file mode 100644 index 00000000..c269f927 --- /dev/null +++ b/src/api/types/BarInsightQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type BarInsightQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/BashTool.ts b/src/api/types/BashTool.ts index aaa71953..a20e3b47 100644 --- a/src/api/types/BashTool.ts +++ b/src/api/types/BashTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface BashTool { /** @@ -13,7 +11,7 @@ export interface BashTool { messages?: Vapi.BashToolMessagesItem[]; type: "bash"; /** The sub type of tool. */ - subType: "bash_20241022"; + subType: Vapi.BashToolSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -115,5 +113,5 @@ export interface BashTool { */ rejectionPlan?: Vapi.ToolRejectionPlan; /** The name of the tool, fixed to 'bash' */ - name: "bash"; + name: Vapi.BashToolName; } diff --git a/src/api/types/BashToolMessagesItem.ts b/src/api/types/BashToolMessagesItem.ts index b28f0009..612c6b53 100644 --- a/src/api/types/BashToolMessagesItem.ts +++ b/src/api/types/BashToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type BashToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/BashToolName.ts b/src/api/types/BashToolName.ts new file mode 100644 index 00000000..67fa7b2e --- /dev/null +++ b/src/api/types/BashToolName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'bash' */ +export const BashToolName = { + Bash: "bash", +} as const; +export type BashToolName = (typeof BashToolName)[keyof typeof BashToolName]; diff --git a/src/api/types/BashToolSubType.ts b/src/api/types/BashToolSubType.ts new file mode 100644 index 00000000..b6e675a2 --- /dev/null +++ b/src/api/types/BashToolSubType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const BashToolSubType = { + Bash20241022: "bash_20241022", +} as const; +export type BashToolSubType = (typeof BashToolSubType)[keyof typeof BashToolSubType]; diff --git a/src/api/types/BashToolWithToolCall.ts b/src/api/types/BashToolWithToolCall.ts index 19049fbe..622b1850 100644 --- a/src/api/types/BashToolWithToolCall.ts +++ b/src/api/types/BashToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface BashToolWithToolCall { /** @@ -12,9 +10,9 @@ export interface BashToolWithToolCall { */ messages?: Vapi.BashToolWithToolCallMessagesItem[]; /** The type of tool. "bash" for Bash tool. */ - type: "bash"; + type: Vapi.BashToolWithToolCallType; /** The sub type of tool. */ - subType: "bash_20241022"; + subType: Vapi.BashToolWithToolCallSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -28,7 +26,7 @@ export interface BashToolWithToolCall { server?: Vapi.Server; toolCall: Vapi.ToolCall; /** The name of the tool, fixed to 'bash' */ - name: "bash"; + name: Vapi.BashToolWithToolCallName; /** * This is the plan to reject a tool call based on the conversation state. * diff --git a/src/api/types/BashToolWithToolCallMessagesItem.ts b/src/api/types/BashToolWithToolCallMessagesItem.ts index 3c19ebbc..dda3a7e0 100644 --- a/src/api/types/BashToolWithToolCallMessagesItem.ts +++ b/src/api/types/BashToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type BashToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/BashToolWithToolCallName.ts b/src/api/types/BashToolWithToolCallName.ts new file mode 100644 index 00000000..80bee180 --- /dev/null +++ b/src/api/types/BashToolWithToolCallName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'bash' */ +export const BashToolWithToolCallName = { + Bash: "bash", +} as const; +export type BashToolWithToolCallName = (typeof BashToolWithToolCallName)[keyof typeof BashToolWithToolCallName]; diff --git a/src/api/types/BashToolWithToolCallSubType.ts b/src/api/types/BashToolWithToolCallSubType.ts new file mode 100644 index 00000000..0b340bc3 --- /dev/null +++ b/src/api/types/BashToolWithToolCallSubType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const BashToolWithToolCallSubType = { + Bash20241022: "bash_20241022", +} as const; +export type BashToolWithToolCallSubType = + (typeof BashToolWithToolCallSubType)[keyof typeof BashToolWithToolCallSubType]; diff --git a/src/api/types/BashToolWithToolCallType.ts b/src/api/types/BashToolWithToolCallType.ts new file mode 100644 index 00000000..2c2895b2 --- /dev/null +++ b/src/api/types/BashToolWithToolCallType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "bash" for Bash tool. */ +export const BashToolWithToolCallType = { + Bash: "bash", +} as const; +export type BashToolWithToolCallType = (typeof BashToolWithToolCallType)[keyof typeof BashToolWithToolCallType]; diff --git a/src/api/types/BearerAuthenticationPlan.ts b/src/api/types/BearerAuthenticationPlan.ts index 68093137..ca26f936 100644 --- a/src/api/types/BearerAuthenticationPlan.ts +++ b/src/api/types/BearerAuthenticationPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface BearerAuthenticationPlan { type: "bearer"; diff --git a/src/api/types/BotMessage.ts b/src/api/types/BotMessage.ts index 49431fb3..3f233ada 100644 --- a/src/api/types/BotMessage.ts +++ b/src/api/types/BotMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface BotMessage { /** The role of the bot in the conversation. */ diff --git a/src/api/types/BothCustomEndpointingRule.ts b/src/api/types/BothCustomEndpointingRule.ts index 5d0fac33..2c926b8f 100644 --- a/src/api/types/BothCustomEndpointingRule.ts +++ b/src/api/types/BothCustomEndpointingRule.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface BothCustomEndpointingRule { /** @@ -18,7 +16,7 @@ export interface BothCustomEndpointingRule { * Usage: * - If you want to wait longer while customer is speaking numbers, you can set a longer timeout. */ - type: "both"; + type: Vapi.BothCustomEndpointingRuleType; /** * This is the regex pattern to match the assistant's message. * diff --git a/src/api/types/BothCustomEndpointingRuleType.ts b/src/api/types/BothCustomEndpointingRuleType.ts new file mode 100644 index 00000000..601bf1b3 --- /dev/null +++ b/src/api/types/BothCustomEndpointingRuleType.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This endpointing rule is based on both the last assistant message and the current customer message as they are speaking. + * + * Flow: + * - Assistant speaks + * - Customer starts speaking + * - Customer transcription comes in + * - This rule is evaluated on the last assistant message and the current customer transcription + * - If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds` + * + * Usage: + * - If you want to wait longer while customer is speaking numbers, you can set a longer timeout. + */ +export const BothCustomEndpointingRuleType = { + Both: "both", +} as const; +export type BothCustomEndpointingRuleType = + (typeof BothCustomEndpointingRuleType)[keyof typeof BothCustomEndpointingRuleType]; diff --git a/src/api/types/BucketPlan.ts b/src/api/types/BucketPlan.ts index 4073c42c..a862dbd4 100644 --- a/src/api/types/BucketPlan.ts +++ b/src/api/types/BucketPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface BucketPlan { /** This is the name of the bucket. */ diff --git a/src/api/types/ByoPhoneNumber.ts b/src/api/types/ByoPhoneNumber.ts index 28957378..f83e7c4c 100644 --- a/src/api/types/ByoPhoneNumber.ts +++ b/src/api/types/ByoPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ByoPhoneNumber { /** diff --git a/src/api/types/ByoPhoneNumberFallbackDestination.ts b/src/api/types/ByoPhoneNumberFallbackDestination.ts index c639349e..db19aca9 100644 --- a/src/api/types/ByoPhoneNumberFallbackDestination.ts +++ b/src/api/types/ByoPhoneNumberFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/ByoPhoneNumberHooksItem.ts b/src/api/types/ByoPhoneNumberHooksItem.ts index 213e0c87..c027991d 100644 --- a/src/api/types/ByoPhoneNumberHooksItem.ts +++ b/src/api/types/ByoPhoneNumberHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ByoPhoneNumberHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/ByoPhoneNumberStatus.ts b/src/api/types/ByoPhoneNumberStatus.ts index 7a49efec..70afb536 100644 --- a/src/api/types/ByoPhoneNumberStatus.ts +++ b/src/api/types/ByoPhoneNumberStatus.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the phone number. - */ -export type ByoPhoneNumberStatus = "active" | "activating" | "blocked"; +/** This is the status of the phone number. */ export const ByoPhoneNumberStatus = { Active: "active", Activating: "activating", Blocked: "blocked", } as const; +export type ByoPhoneNumberStatus = (typeof ByoPhoneNumberStatus)[keyof typeof ByoPhoneNumberStatus]; diff --git a/src/api/types/ByoSipTrunkCredential.ts b/src/api/types/ByoSipTrunkCredential.ts index e250c4ec..dece304f 100644 --- a/src/api/types/ByoSipTrunkCredential.ts +++ b/src/api/types/ByoSipTrunkCredential.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ByoSipTrunkCredential { /** This can be used to bring your own SIP trunks or to connect to a Carrier. */ - provider?: "byo-sip-trunk"; + provider?: Vapi.ByoSipTrunkCredentialProvider; /** This is the unique identifier for the credential. */ id: string; /** This is the unique identifier for the org that this credential belongs to. */ diff --git a/src/api/types/ByoSipTrunkCredentialProvider.ts b/src/api/types/ByoSipTrunkCredentialProvider.ts new file mode 100644 index 00000000..6973de62 --- /dev/null +++ b/src/api/types/ByoSipTrunkCredentialProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This can be used to bring your own SIP trunks or to connect to a Carrier. */ +export const ByoSipTrunkCredentialProvider = { + ByoSipTrunk: "byo-sip-trunk", +} as const; +export type ByoSipTrunkCredentialProvider = + (typeof ByoSipTrunkCredentialProvider)[keyof typeof ByoSipTrunkCredentialProvider]; diff --git a/src/api/types/Call.ts b/src/api/types/Call.ts index 338c8bdd..9a9cb823 100644 --- a/src/api/types/Call.ts +++ b/src/api/types/Call.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Call { /** This is the type of call. */ @@ -100,6 +98,11 @@ export interface Call { * - Workflow, use `workflow` or `workflowId` */ squad?: Vapi.CreateSquadDto; + /** + * These are the overrides for the `squad` or `squadId`'s member settings and template variables. + * This will apply to all members of the squad. + */ + squadOverrides?: Vapi.AssistantOverrides; /** * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. * diff --git a/src/api/types/CallBatchError.ts b/src/api/types/CallBatchError.ts index 11172629..7a1021bd 100644 --- a/src/api/types/CallBatchError.ts +++ b/src/api/types/CallBatchError.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CallBatchError { customer: Vapi.CreateCustomerDto; diff --git a/src/api/types/CallBatchResponse.ts b/src/api/types/CallBatchResponse.ts index 536d3be5..ebf57234 100644 --- a/src/api/types/CallBatchResponse.ts +++ b/src/api/types/CallBatchResponse.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CallBatchResponse { + /** Subscription limits at the end of this batch */ + subscriptionLimits?: Vapi.SubscriptionLimits; /** This is the list of calls that were created. */ results: Vapi.Call[]; /** This is the list of calls that failed to be created. */ diff --git a/src/api/types/CallCostsItem.ts b/src/api/types/CallCostsItem.ts index bd9a47f2..95971231 100644 --- a/src/api/types/CallCostsItem.ts +++ b/src/api/types/CallCostsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CallCostsItem = | Vapi.TransportCost diff --git a/src/api/types/CallDestination.ts b/src/api/types/CallDestination.ts index d3f17837..3a11c3b6 100644 --- a/src/api/types/CallDestination.ts +++ b/src/api/types/CallDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination where the call ended up being transferred to. If the call was not transferred, this will be empty. diff --git a/src/api/types/CallEndedReason.ts b/src/api/types/CallEndedReason.ts index 18106695..12c4638b 100644 --- a/src/api/types/CallEndedReason.ts +++ b/src/api/types/CallEndedReason.ts @@ -1,538 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the explanation for how the call ended. - */ -export type CallEndedReason = - | "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" - | "pipeline-error-openai-voice-failed" - | "pipeline-error-cartesia-voice-failed" - | "pipeline-error-deepgram-voice-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-smallest-ai-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-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-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-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" - | "call.in-progress.error-pipeline-no-available-llm-model" - | "worker-shutdown" - | "vonage-disconnected" - | "vonage-failed-to-connect-call" - | "vonage-completed" - | "phone-call-provider-bypass-enabled-but-no-call-received" - | "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-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-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-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-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-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" - | "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" - | "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" - | "pipeline-error-eleven-labs-unauthorized-to-access-model" - | "pipeline-error-eleven-labs-professional-voices-only-for-creator-plus" - | "pipeline-error-eleven-labs-blocked-free-plan-and-requested-upgrade" - | "pipeline-error-eleven-labs-blocked-concurrent-requests-and-requested-upgrade" - | "pipeline-error-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade" - | "pipeline-error-eleven-labs-system-busy-and-requested-upgrade" - | "pipeline-error-eleven-labs-voice-not-fine-tuned" - | "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-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-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" - | "pipeline-error-playht-403-forbidden-api-access-not-available" - | "pipeline-error-playht-429-exceeded-quota" - | "pipeline-error-playht-502-gateway-error" - | "pipeline-error-playht-504-gateway-error" - | "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-eleven-labs-transcriber-failed" - | "call.in-progress.error-vapifault-eleven-labs-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" - | "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" - | "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" - | "call.in-progress.error-warm-transfer-hang-timeout" - | "call.in-progress.error-warm-transfer-idle-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-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-sip-inbound-call-failed-to-connect" - | "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-503-service-unavailable" - | "call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable" - | "call.in-progress.error-sip-outbound-call-failed-to-connect" - | "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" - | "call.ringing.error-sip-inbound-call-failed-to-connect" - | "twilio-failed-to-connect-call" - | "twilio-reported-customer-misdialed" - | "vonage-rejected" - | "voicemail" - | "call-deleted"; +/** This is the explanation for how the call ended. */ export const CallEndedReason = { CallStartErrorNeitherAssistantNorServerSet: "call-start-error-neither-assistant-nor-server-set", AssistantRequestFailed: "assistant-request-failed", @@ -571,6 +39,7 @@ export const CallEndedReason = { PipelineErrorAzureVoiceFailed: "pipeline-error-azure-voice-failed", PipelineErrorRimeAiVoiceFailed: "pipeline-error-rime-ai-voice-failed", PipelineErrorSmallestAiVoiceFailed: "pipeline-error-smallest-ai-voice-failed", + PipelineErrorVapiVoiceFailed: "pipeline-error-vapi-voice-failed", PipelineErrorNeuphonicVoiceFailed: "pipeline-error-neuphonic-voice-failed", PipelineErrorHumeVoiceFailed: "pipeline-error-hume-voice-failed", PipelineErrorSesameVoiceFailed: "pipeline-error-sesame-voice-failed", @@ -586,6 +55,7 @@ export const CallEndedReason = { CallInProgressErrorVapifaultAzureVoiceFailed: "call.in-progress.error-vapifault-azure-voice-failed", CallInProgressErrorVapifaultRimeAiVoiceFailed: "call.in-progress.error-vapifault-rime-ai-voice-failed", CallInProgressErrorVapifaultSmallestAiVoiceFailed: "call.in-progress.error-vapifault-smallest-ai-voice-failed", + CallInProgressErrorVapifaultVapiVoiceFailed: "call.in-progress.error-vapifault-vapi-voice-failed", CallInProgressErrorVapifaultNeuphonicVoiceFailed: "call.in-progress.error-vapifault-neuphonic-voice-failed", CallInProgressErrorVapifaultHumeVoiceFailed: "call.in-progress.error-vapifault-hume-voice-failed", CallInProgressErrorVapifaultSesameVoiceFailed: "call.in-progress.error-vapifault-sesame-voice-failed", @@ -1044,6 +514,7 @@ export const CallEndedReason = { "call.in-progress.error-providerfault-custom-llm-500-server-error", CallInProgressErrorProviderfaultCustomLlm503ServerOverloadedError: "call.in-progress.error-providerfault-custom-llm-503-server-overloaded-error", + CallInProgressErrorPipelineWsModelConnectionFailed: "call.in-progress.error-pipeline-ws-model-connection-failed", PipelineErrorCustomVoiceFailed: "pipeline-error-custom-voice-failed", PipelineErrorCartesiaSocketHangUp: "pipeline-error-cartesia-socket-hang-up", PipelineErrorCartesiaRequestedPayment: "pipeline-error-cartesia-requested-payment", @@ -1127,6 +598,8 @@ export const CallEndedReason = { "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", CallInProgressErrorVapifaultElevenLabsBlockedVoicePotentiallyAgainstTermsOfServiceAndAwaitingVerification: "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + CallInProgressErrorProviderfaultElevenLabsSystemBusyAndRequestedUpgrade: + "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", CallInProgressErrorProviderfaultElevenLabs500ServerError: "call.in-progress.error-providerfault-eleven-labs-500-server-error", CallInProgressErrorProviderfaultElevenLabs503ServerError: @@ -1199,8 +672,6 @@ export const CallEndedReason = { CallInProgressErrorWarmTransferAssistantCancelled: "call.in-progress.error-warm-transfer-assistant-cancelled", CallInProgressErrorWarmTransferSilenceTimeout: "call.in-progress.error-warm-transfer-silence-timeout", CallInProgressErrorWarmTransferMicrophoneTimeout: "call.in-progress.error-warm-transfer-microphone-timeout", - CallInProgressErrorWarmTransferHangTimeout: "call.in-progress.error-warm-transfer-hang-timeout", - CallInProgressErrorWarmTransferIdleTimeout: "call.in-progress.error-warm-transfer-idle-timeout", AssistantEndedCall: "assistant-ended-call", AssistantSaidEndCallPhrase: "assistant-said-end-call-phrase", AssistantEndedCallWithHangupTask: "assistant-ended-call-with-hangup-task", @@ -1243,3 +714,4 @@ export const CallEndedReason = { Voicemail: "voicemail", CallDeleted: "call-deleted", } as const; +export type CallEndedReason = (typeof CallEndedReason)[keyof typeof CallEndedReason]; diff --git a/src/api/types/CallHookAssistantSpeechInterrupted.ts b/src/api/types/CallHookAssistantSpeechInterrupted.ts index ea057296..5798c755 100644 --- a/src/api/types/CallHookAssistantSpeechInterrupted.ts +++ b/src/api/types/CallHookAssistantSpeechInterrupted.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CallHookAssistantSpeechInterrupted { /** This is the event that triggers this hook */ - on: "assistant.speech.interrupted"; + on: Vapi.CallHookAssistantSpeechInterruptedOn; /** This is the set of actions to perform when the hook triggers */ do: Vapi.CallHookAssistantSpeechInterruptedDoItem[]; } diff --git a/src/api/types/CallHookAssistantSpeechInterruptedDoItem.ts b/src/api/types/CallHookAssistantSpeechInterruptedDoItem.ts index 394156c9..97420abd 100644 --- a/src/api/types/CallHookAssistantSpeechInterruptedDoItem.ts +++ b/src/api/types/CallHookAssistantSpeechInterruptedDoItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CallHookAssistantSpeechInterruptedDoItem = Vapi.SayHookAction | Vapi.ToolCallHookAction; diff --git a/src/api/types/CallHookAssistantSpeechInterruptedOn.ts b/src/api/types/CallHookAssistantSpeechInterruptedOn.ts new file mode 100644 index 00000000..8642bb40 --- /dev/null +++ b/src/api/types/CallHookAssistantSpeechInterruptedOn.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the event that triggers this hook */ +export const CallHookAssistantSpeechInterruptedOn = { + AssistantSpeechInterrupted: "assistant.speech.interrupted", +} as const; +export type CallHookAssistantSpeechInterruptedOn = + (typeof CallHookAssistantSpeechInterruptedOn)[keyof typeof CallHookAssistantSpeechInterruptedOn]; diff --git a/src/api/types/CallHookCallEnding.ts b/src/api/types/CallHookCallEnding.ts index 5093ef3f..6d476c61 100644 --- a/src/api/types/CallHookCallEnding.ts +++ b/src/api/types/CallHookCallEnding.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CallHookCallEnding { /** This is the event that triggers this hook */ - on: "call.ending"; + on: Vapi.CallHookCallEndingOn; /** This is the set of actions to perform when the hook triggers */ do: Vapi.ToolCallHookAction[]; /** This is the set of filters that must match for the hook to trigger */ diff --git a/src/api/types/CallHookCallEndingOn.ts b/src/api/types/CallHookCallEndingOn.ts new file mode 100644 index 00000000..5cd9fb3d --- /dev/null +++ b/src/api/types/CallHookCallEndingOn.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the event that triggers this hook */ +export const CallHookCallEndingOn = { + CallEnding: "call.ending", +} as const; +export type CallHookCallEndingOn = (typeof CallHookCallEndingOn)[keyof typeof CallHookCallEndingOn]; diff --git a/src/api/types/CallHookCustomerSpeechInterrupted.ts b/src/api/types/CallHookCustomerSpeechInterrupted.ts index 2ed82cbb..1a821565 100644 --- a/src/api/types/CallHookCustomerSpeechInterrupted.ts +++ b/src/api/types/CallHookCustomerSpeechInterrupted.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CallHookCustomerSpeechInterrupted { /** This is the event that triggers this hook */ - on: "customer.speech.interrupted"; + on: Vapi.CallHookCustomerSpeechInterruptedOn; /** This is the set of actions to perform when the hook triggers */ do: Vapi.CallHookCustomerSpeechInterruptedDoItem[]; } diff --git a/src/api/types/CallHookCustomerSpeechInterruptedDoItem.ts b/src/api/types/CallHookCustomerSpeechInterruptedDoItem.ts index 8f24b1f4..bf3860f5 100644 --- a/src/api/types/CallHookCustomerSpeechInterruptedDoItem.ts +++ b/src/api/types/CallHookCustomerSpeechInterruptedDoItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CallHookCustomerSpeechInterruptedDoItem = Vapi.SayHookAction | Vapi.ToolCallHookAction; diff --git a/src/api/types/CallHookCustomerSpeechInterruptedOn.ts b/src/api/types/CallHookCustomerSpeechInterruptedOn.ts new file mode 100644 index 00000000..e567bdab --- /dev/null +++ b/src/api/types/CallHookCustomerSpeechInterruptedOn.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the event that triggers this hook */ +export const CallHookCustomerSpeechInterruptedOn = { + CustomerSpeechInterrupted: "customer.speech.interrupted", +} as const; +export type CallHookCustomerSpeechInterruptedOn = + (typeof CallHookCustomerSpeechInterruptedOn)[keyof typeof CallHookCustomerSpeechInterruptedOn]; diff --git a/src/api/types/CallHookCustomerSpeechTimeout.ts b/src/api/types/CallHookCustomerSpeechTimeout.ts index 76462c7e..f14caf2d 100644 --- a/src/api/types/CallHookCustomerSpeechTimeout.ts +++ b/src/api/types/CallHookCustomerSpeechTimeout.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CallHookCustomerSpeechTimeout { /** Must be either "customer.speech.timeout" or match the pattern "customer.speech.timeout[property=value]" */ diff --git a/src/api/types/CallHookCustomerSpeechTimeoutDoItem.ts b/src/api/types/CallHookCustomerSpeechTimeoutDoItem.ts index 36d7e534..22afa89d 100644 --- a/src/api/types/CallHookCustomerSpeechTimeoutDoItem.ts +++ b/src/api/types/CallHookCustomerSpeechTimeoutDoItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CallHookCustomerSpeechTimeoutDoItem = Vapi.SayHookAction | Vapi.ToolCallHookAction; diff --git a/src/api/types/CallHookFilter.ts b/src/api/types/CallHookFilter.ts index 029324ae..c89c5bbb 100644 --- a/src/api/types/CallHookFilter.ts +++ b/src/api/types/CallHookFilter.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface CallHookFilter { /** This is the type of filter - currently only "oneOf" is supported */ - type: "oneOf"; + type: Vapi.CallHookFilterType; /** This is the key to filter on (e.g. "call.endedReason") */ key: string; /** This is the array of possible values to match against */ diff --git a/src/api/types/CallHookFilterType.ts b/src/api/types/CallHookFilterType.ts new file mode 100644 index 00000000..3f990a7a --- /dev/null +++ b/src/api/types/CallHookFilterType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of filter - currently only "oneOf" is supported */ +export const CallHookFilterType = { + OneOf: "oneOf", +} as const; +export type CallHookFilterType = (typeof CallHookFilterType)[keyof typeof CallHookFilterType]; diff --git a/src/api/types/CallHookModelResponseTimeout.ts b/src/api/types/CallHookModelResponseTimeout.ts new file mode 100644 index 00000000..69c400c8 --- /dev/null +++ b/src/api/types/CallHookModelResponseTimeout.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface CallHookModelResponseTimeout { + /** This is the event that triggers this hook */ + on: Vapi.CallHookModelResponseTimeoutOn; + /** This is the set of actions to perform when the hook triggers */ + do: Vapi.CallHookModelResponseTimeoutDoItem[]; +} diff --git a/src/api/types/CallHookModelResponseTimeoutDoItem.ts b/src/api/types/CallHookModelResponseTimeoutDoItem.ts new file mode 100644 index 00000000..aa4220ef --- /dev/null +++ b/src/api/types/CallHookModelResponseTimeoutDoItem.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type CallHookModelResponseTimeoutDoItem = Vapi.SayHookAction | Vapi.ToolCallHookAction; diff --git a/src/api/types/CallHookModelResponseTimeoutOn.ts b/src/api/types/CallHookModelResponseTimeoutOn.ts new file mode 100644 index 00000000..6fd040e1 --- /dev/null +++ b/src/api/types/CallHookModelResponseTimeoutOn.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the event that triggers this hook */ +export const CallHookModelResponseTimeoutOn = { + ModelResponseTimeout: "model.response.timeout", +} as const; +export type CallHookModelResponseTimeoutOn = + (typeof CallHookModelResponseTimeoutOn)[keyof typeof CallHookModelResponseTimeoutOn]; diff --git a/src/api/types/CallMessagesItem.ts b/src/api/types/CallMessagesItem.ts index 3256783c..08eaf3d8 100644 --- a/src/api/types/CallMessagesItem.ts +++ b/src/api/types/CallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CallMessagesItem = | Vapi.UserMessage diff --git a/src/api/types/CallPaginatedResponse.ts b/src/api/types/CallPaginatedResponse.ts index 134c7fa1..e308cf54 100644 --- a/src/api/types/CallPaginatedResponse.ts +++ b/src/api/types/CallPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CallPaginatedResponse { results: Vapi.Call[]; diff --git a/src/api/types/CallPhoneCallProvider.ts b/src/api/types/CallPhoneCallProvider.ts index 33b1e715..1564a844 100644 --- a/src/api/types/CallPhoneCallProvider.ts +++ b/src/api/types/CallPhoneCallProvider.ts @@ -1,16 +1,14 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the provider of the call. * * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. */ -export type CallPhoneCallProvider = "twilio" | "vonage" | "vapi" | "telnyx"; export const CallPhoneCallProvider = { Twilio: "twilio", Vonage: "vonage", Vapi: "vapi", Telnyx: "telnyx", } as const; +export type CallPhoneCallProvider = (typeof CallPhoneCallProvider)[keyof typeof CallPhoneCallProvider]; diff --git a/src/api/types/CallPhoneCallTransport.ts b/src/api/types/CallPhoneCallTransport.ts index 1339232c..0443f7d1 100644 --- a/src/api/types/CallPhoneCallTransport.ts +++ b/src/api/types/CallPhoneCallTransport.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the transport of the phone call. * * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type. */ -export type CallPhoneCallTransport = "sip" | "pstn"; export const CallPhoneCallTransport = { Sip: "sip", Pstn: "pstn", } as const; +export type CallPhoneCallTransport = (typeof CallPhoneCallTransport)[keyof typeof CallPhoneCallTransport]; diff --git a/src/api/types/CallStatus.ts b/src/api/types/CallStatus.ts index d2926db0..96642cc7 100644 --- a/src/api/types/CallStatus.ts +++ b/src/api/types/CallStatus.ts @@ -1,19 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the call. - */ -export type CallStatus = - | "scheduled" - | "queued" - | "ringing" - | "in-progress" - | "forwarding" - | "ended" - | "not-found" - | "deletion-failed"; +/** This is the status of the call. */ export const CallStatus = { Scheduled: "scheduled", Queued: "queued", @@ -24,3 +11,4 @@ export const CallStatus = { NotFound: "not-found", DeletionFailed: "deletion-failed", } as const; +export type CallStatus = (typeof CallStatus)[keyof typeof CallStatus]; diff --git a/src/api/types/CallType.ts b/src/api/types/CallType.ts index 3529d9d9..f6899dd6 100644 --- a/src/api/types/CallType.ts +++ b/src/api/types/CallType.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the type of call. - */ -export type CallType = "inboundPhoneCall" | "outboundPhoneCall" | "webCall" | "vapi.websocketCall"; +/** This is the type of call. */ export const CallType = { InboundPhoneCall: "inboundPhoneCall", OutboundPhoneCall: "outboundPhoneCall", WebCall: "webCall", VapiWebsocketCall: "vapi.websocketCall", } as const; +export type CallType = (typeof CallType)[keyof typeof CallType]; diff --git a/src/api/types/Campaign.ts b/src/api/types/Campaign.ts index 2e88d34f..0df2badc 100644 --- a/src/api/types/Campaign.ts +++ b/src/api/types/Campaign.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Campaign { /** This is the status of the campaign. */ @@ -17,7 +15,7 @@ export interface Campaign { workflowId?: string; /** This is the phone number ID that will be used for the campaign calls. */ phoneNumberId: string; - /** This is the schedule plan for the campaign. */ + /** 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. */ schedulePlan?: Vapi.SchedulePlan; /** These are the customers that will be called in the campaign. */ customers: Vapi.CreateCustomerDto[]; diff --git a/src/api/types/CampaignEndedReason.ts b/src/api/types/CampaignEndedReason.ts index 707878a9..51fbf373 100644 --- a/src/api/types/CampaignEndedReason.ts +++ b/src/api/types/CampaignEndedReason.ts @@ -1,16 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the explanation for how the campaign ended. - */ -export type CampaignEndedReason = - | "campaign.scheduled.ended-by-user" - | "campaign.in-progress.ended-by-user" - | "campaign.ended.success"; +/** This is the explanation for how the campaign ended. */ export const CampaignEndedReason = { CampaignScheduledEndedByUser: "campaign.scheduled.ended-by-user", CampaignInProgressEndedByUser: "campaign.in-progress.ended-by-user", CampaignEndedSuccess: "campaign.ended.success", } as const; +export type CampaignEndedReason = (typeof CampaignEndedReason)[keyof typeof CampaignEndedReason]; diff --git a/src/api/types/CampaignPaginatedResponse.ts b/src/api/types/CampaignPaginatedResponse.ts index 71566fd0..316e3c75 100644 --- a/src/api/types/CampaignPaginatedResponse.ts +++ b/src/api/types/CampaignPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CampaignPaginatedResponse { results: Vapi.Campaign[]; diff --git a/src/api/types/CampaignStatus.ts b/src/api/types/CampaignStatus.ts index b56edf75..2a28f3b2 100644 --- a/src/api/types/CampaignStatus.ts +++ b/src/api/types/CampaignStatus.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the campaign. - */ -export type CampaignStatus = "scheduled" | "in-progress" | "ended"; +/** This is the status of the campaign. */ export const CampaignStatus = { Scheduled: "scheduled", InProgress: "in-progress", Ended: "ended", } as const; +export type CampaignStatus = (typeof CampaignStatus)[keyof typeof CampaignStatus]; diff --git a/src/api/types/CartesiaCredential.ts b/src/api/types/CartesiaCredential.ts index 9a1a733b..079aea6a 100644 --- a/src/api/types/CartesiaCredential.ts +++ b/src/api/types/CartesiaCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface CartesiaCredential { - provider: "cartesia"; + provider: Vapi.CartesiaCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/CartesiaCredentialProvider.ts b/src/api/types/CartesiaCredentialProvider.ts new file mode 100644 index 00000000..5c532255 --- /dev/null +++ b/src/api/types/CartesiaCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CartesiaCredentialProvider = { + Cartesia: "cartesia", +} as const; +export type CartesiaCredentialProvider = (typeof CartesiaCredentialProvider)[keyof typeof CartesiaCredentialProvider]; diff --git a/src/api/types/CartesiaExperimentalControls.ts b/src/api/types/CartesiaExperimentalControls.ts index 29a6b7d9..4bb7cb4f 100644 --- a/src/api/types/CartesiaExperimentalControls.ts +++ b/src/api/types/CartesiaExperimentalControls.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CartesiaExperimentalControls { speed?: Vapi.CartesiaSpeedControl; diff --git a/src/api/types/CartesiaExperimentalControlsEmotion.ts b/src/api/types/CartesiaExperimentalControlsEmotion.ts index 2c6d9bed..50e0ecd3 100644 --- a/src/api/types/CartesiaExperimentalControlsEmotion.ts +++ b/src/api/types/CartesiaExperimentalControlsEmotion.ts @@ -1,28 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CartesiaExperimentalControlsEmotion = - | "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"; export const CartesiaExperimentalControlsEmotion = { AngerLowest: "anger:lowest", AngerLow: "anger:low", @@ -45,3 +22,5 @@ export const CartesiaExperimentalControlsEmotion = { CuriosityHigh: "curiosity:high", CuriosityHighest: "curiosity:highest", } as const; +export type CartesiaExperimentalControlsEmotion = + (typeof CartesiaExperimentalControlsEmotion)[keyof typeof CartesiaExperimentalControlsEmotion]; diff --git a/src/api/types/CartesiaExperimentalControlsSpeed.ts b/src/api/types/CartesiaExperimentalControlsSpeed.ts deleted file mode 100644 index bbba8cff..00000000 --- a/src/api/types/CartesiaExperimentalControlsSpeed.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type CartesiaExperimentalControlsSpeed = "slowest" | "slow" | "normal" | "fast" | "fastest"; -export const CartesiaExperimentalControlsSpeed = { - Slowest: "slowest", - Slow: "slow", - Normal: "normal", - Fast: "fast", - Fastest: "fastest", -} as const; diff --git a/src/api/types/CartesiaExperimentalControlsSpeedZero.ts b/src/api/types/CartesiaExperimentalControlsSpeedZero.ts new file mode 100644 index 00000000..a9a8c482 --- /dev/null +++ b/src/api/types/CartesiaExperimentalControlsSpeedZero.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CartesiaExperimentalControlsSpeedZero = { + Slowest: "slowest", + Slow: "slow", + Normal: "normal", + Fast: "fast", + Fastest: "fastest", +} as const; +export type CartesiaExperimentalControlsSpeedZero = + (typeof CartesiaExperimentalControlsSpeedZero)[keyof typeof CartesiaExperimentalControlsSpeedZero]; diff --git a/src/api/types/CartesiaGenerationConfig.ts b/src/api/types/CartesiaGenerationConfig.ts new file mode 100644 index 00000000..30b71819 --- /dev/null +++ b/src/api/types/CartesiaGenerationConfig.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface CartesiaGenerationConfig { + /** Fine-grained speed control for sonic-3. Only available for sonic-3 model. */ + speed?: number; + /** Fine-grained volume control for sonic-3. Only available for sonic-3 model. */ + volume?: number; + /** Experimental model controls for sonic-3. These are subject to breaking changes. */ + experimental?: Vapi.CartesiaGenerationConfigExperimental; +} diff --git a/src/api/types/CartesiaGenerationConfigExperimental.ts b/src/api/types/CartesiaGenerationConfigExperimental.ts new file mode 100644 index 00000000..62b36162 --- /dev/null +++ b/src/api/types/CartesiaGenerationConfigExperimental.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface CartesiaGenerationConfigExperimental { + /** 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. */ + accentLocalization?: number; +} diff --git a/src/api/types/CartesiaSpeedControl.ts b/src/api/types/CartesiaSpeedControl.ts index d371d676..1555f7ee 100644 --- a/src/api/types/CartesiaSpeedControl.ts +++ b/src/api/types/CartesiaSpeedControl.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; -export type CartesiaSpeedControl = Vapi.CartesiaExperimentalControlsSpeed | number; +export type CartesiaSpeedControl = Vapi.CartesiaExperimentalControlsSpeedZero | number; diff --git a/src/api/types/CartesiaTranscriber.ts b/src/api/types/CartesiaTranscriber.ts index 4ac1f679..80978658 100644 --- a/src/api/types/CartesiaTranscriber.ts +++ b/src/api/types/CartesiaTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CartesiaTranscriber { - provider: "cartesia"; - model?: "ink-whisper"; + provider: Vapi.CartesiaTranscriberProvider; + model?: Vapi.CartesiaTranscriberModel; language?: Vapi.CartesiaTranscriberLanguage; /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */ fallbackPlan?: Vapi.FallbackTranscriberPlan; diff --git a/src/api/types/CartesiaTranscriberLanguage.ts b/src/api/types/CartesiaTranscriberLanguage.ts index 73f155ba..439cc84e 100644 --- a/src/api/types/CartesiaTranscriberLanguage.ts +++ b/src/api/types/CartesiaTranscriberLanguage.ts @@ -1,193 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CartesiaTranscriberLanguage = - | "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"; export const CartesiaTranscriberLanguage = { Aa: "aa", Ab: "ab", @@ -375,3 +187,5 @@ export const CartesiaTranscriberLanguage = { Zh: "zh", Zu: "zu", } as const; +export type CartesiaTranscriberLanguage = + (typeof CartesiaTranscriberLanguage)[keyof typeof CartesiaTranscriberLanguage]; diff --git a/src/api/types/CartesiaTranscriberModel.ts b/src/api/types/CartesiaTranscriberModel.ts new file mode 100644 index 00000000..031175c5 --- /dev/null +++ b/src/api/types/CartesiaTranscriberModel.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CartesiaTranscriberModel = { + InkWhisper: "ink-whisper", +} as const; +export type CartesiaTranscriberModel = (typeof CartesiaTranscriberModel)[keyof typeof CartesiaTranscriberModel]; diff --git a/src/api/types/CartesiaTranscriberProvider.ts b/src/api/types/CartesiaTranscriberProvider.ts new file mode 100644 index 00000000..bbe03be0 --- /dev/null +++ b/src/api/types/CartesiaTranscriberProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CartesiaTranscriberProvider = { + Cartesia: "cartesia", +} as const; +export type CartesiaTranscriberProvider = + (typeof CartesiaTranscriberProvider)[keyof typeof CartesiaTranscriberProvider]; diff --git a/src/api/types/CartesiaVoice.ts b/src/api/types/CartesiaVoice.ts index ae1ad116..3c213a6c 100644 --- a/src/api/types/CartesiaVoice.ts +++ b/src/api/types/CartesiaVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CartesiaVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "cartesia"; + provider: Vapi.CartesiaVoiceProvider; /** The ID of the particular voice you want to use. */ voiceId: string; /** This is the model that will be used. This is optional and will default to the correct model for the voiceId. */ @@ -17,6 +15,10 @@ export interface CartesiaVoice { language?: Vapi.CartesiaVoiceLanguage; /** Experimental controls for Cartesia voice generation */ experimentalControls?: Vapi.CartesiaExperimentalControls; + /** Generation config for fine-grained control of sonic-3 voice output (speed, volume, and experimental controls). Only available for sonic-3 model. */ + generationConfig?: Vapi.CartesiaGenerationConfig; + /** Pronunciation dictionary ID for sonic-3. Allows custom pronunciations for specific words. Only available for sonic-3 model. */ + pronunciationDictId?: string; /** This is the plan for chunking the model output before it is sent to the voice provider. */ chunkPlan?: Vapi.ChunkPlan; /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */ diff --git a/src/api/types/CartesiaVoiceLanguage.ts b/src/api/types/CartesiaVoiceLanguage.ts index b3da3bfb..a4c9e17e 100644 --- a/src/api/types/CartesiaVoiceLanguage.ts +++ b/src/api/types/CartesiaVoiceLanguage.ts @@ -1,40 +1,48 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the language that will be used. This is optional and will default to the correct language for the voiceId. - */ -export type CartesiaVoiceLanguage = - | "en" - | "de" - | "es" - | "fr" - | "ja" - | "pt" - | "zh" - | "hi" - | "it" - | "ko" - | "nl" - | "pl" - | "ru" - | "sv" - | "tr"; +/** This is the language that will be used. This is optional and will default to the correct language for the voiceId. */ export const CartesiaVoiceLanguage = { - En: "en", + Ar: "ar", + Bg: "bg", + Bn: "bn", + Cs: "cs", + Da: "da", De: "de", + El: "el", + En: "en", Es: "es", + Fi: "fi", Fr: "fr", - Ja: "ja", - Pt: "pt", - Zh: "zh", + Gu: "gu", + He: "he", Hi: "hi", + Hr: "hr", + Hu: "hu", + Id: "id", It: "it", + Ja: "ja", + Ka: "ka", + Kn: "kn", Ko: "ko", + Ml: "ml", + Mr: "mr", + Ms: "ms", Nl: "nl", + No: "no", + Pa: "pa", Pl: "pl", + Pt: "pt", + Ro: "ro", Ru: "ru", + Sk: "sk", Sv: "sv", + Ta: "ta", + Te: "te", + Th: "th", + Tl: "tl", Tr: "tr", + Uk: "uk", + Vi: "vi", + Zh: "zh", } as const; +export type CartesiaVoiceLanguage = (typeof CartesiaVoiceLanguage)[keyof typeof CartesiaVoiceLanguage]; diff --git a/src/api/types/CartesiaVoiceModel.ts b/src/api/types/CartesiaVoiceModel.ts index 2f9b7cb4..30ca6e23 100644 --- a/src/api/types/CartesiaVoiceModel.ts +++ b/src/api/types/CartesiaVoiceModel.ts @@ -1,15 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. This is optional and will default to the correct model for the voiceId. - */ -export type CartesiaVoiceModel = "sonic-2" | "sonic-english" | "sonic-multilingual" | "sonic-preview" | "sonic"; +/** This is the model that will be used. This is optional and will default to the correct model for the voiceId. */ export const CartesiaVoiceModel = { + Sonic3: "sonic-3", Sonic2: "sonic-2", SonicEnglish: "sonic-english", SonicMultilingual: "sonic-multilingual", SonicPreview: "sonic-preview", Sonic: "sonic", } as const; +export type CartesiaVoiceModel = (typeof CartesiaVoiceModel)[keyof typeof CartesiaVoiceModel]; diff --git a/src/api/types/CartesiaVoiceProvider.ts b/src/api/types/CartesiaVoiceProvider.ts new file mode 100644 index 00000000..86615be2 --- /dev/null +++ b/src/api/types/CartesiaVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const CartesiaVoiceProvider = { + Cartesia: "cartesia", +} as const; +export type CartesiaVoiceProvider = (typeof CartesiaVoiceProvider)[keyof typeof CartesiaVoiceProvider]; diff --git a/src/api/types/CerebrasCredential.ts b/src/api/types/CerebrasCredential.ts index 614187d8..45391c98 100644 --- a/src/api/types/CerebrasCredential.ts +++ b/src/api/types/CerebrasCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface CerebrasCredential { - provider: "cerebras"; + provider: Vapi.CerebrasCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/CerebrasCredentialProvider.ts b/src/api/types/CerebrasCredentialProvider.ts new file mode 100644 index 00000000..28b1a87c --- /dev/null +++ b/src/api/types/CerebrasCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CerebrasCredentialProvider = { + Cerebras: "cerebras", +} as const; +export type CerebrasCredentialProvider = (typeof CerebrasCredentialProvider)[keyof typeof CerebrasCredentialProvider]; diff --git a/src/api/types/CerebrasModel.ts b/src/api/types/CerebrasModel.ts index 16da28c7..27f86f81 100644 --- a/src/api/types/CerebrasModel.ts +++ b/src/api/types/CerebrasModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CerebrasModel { /** This is the starting state for the conversation. */ @@ -23,7 +21,7 @@ export interface CerebrasModel { knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: Vapi.CerebrasModelModel; - provider: "cerebras"; + provider: Vapi.CerebrasModelProvider; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ temperature?: number; /** This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. */ diff --git a/src/api/types/CerebrasModelModel.ts b/src/api/types/CerebrasModelModel.ts index 976f3cc1..44852dbe 100644 --- a/src/api/types/CerebrasModelModel.ts +++ b/src/api/types/CerebrasModelModel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b - */ -export type CerebrasModelModel = "llama3.1-8b" | "llama-3.3-70b"; +/** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ export const CerebrasModelModel = { Llama318B: "llama3.1-8b", Llama3370B: "llama-3.3-70b", } as const; +export type CerebrasModelModel = (typeof CerebrasModelModel)[keyof typeof CerebrasModelModel]; diff --git a/src/api/types/CerebrasModelProvider.ts b/src/api/types/CerebrasModelProvider.ts new file mode 100644 index 00000000..5d570cf6 --- /dev/null +++ b/src/api/types/CerebrasModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CerebrasModelProvider = { + Cerebras: "cerebras", +} as const; +export type CerebrasModelProvider = (typeof CerebrasModelProvider)[keyof typeof CerebrasModelProvider]; diff --git a/src/api/types/CerebrasModelToolsItem.ts b/src/api/types/CerebrasModelToolsItem.ts index 05ccaca2..0fced47e 100644 --- a/src/api/types/CerebrasModelToolsItem.ts +++ b/src/api/types/CerebrasModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CerebrasModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/Chat.ts b/src/api/types/Chat.ts index 45f6ac7a..908f3353 100644 --- a/src/api/types/Chat.ts +++ b/src/api/types/Chat.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Chat { /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */ diff --git a/src/api/types/ChatAssistantOverrides.ts b/src/api/types/ChatAssistantOverrides.ts index 9ed6a9e3..ffdce6a8 100644 --- a/src/api/types/ChatAssistantOverrides.ts +++ b/src/api/types/ChatAssistantOverrides.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ChatAssistantOverrides { /** Variable values for template substitution */ diff --git a/src/api/types/ChatCost.ts b/src/api/types/ChatCost.ts index a9f0b7b9..031737b3 100644 --- a/src/api/types/ChatCost.ts +++ b/src/api/types/ChatCost.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ChatCost { /** This is the type of cost, always 'chat' for this class. */ - type: "chat"; + type: Vapi.ChatCostType; /** This is the cost of the component in USD. */ cost: number; } diff --git a/src/api/types/ChatCostType.ts b/src/api/types/ChatCostType.ts new file mode 100644 index 00000000..6202ac93 --- /dev/null +++ b/src/api/types/ChatCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'chat' for this class. */ +export const ChatCostType = { + Chat: "chat", +} as const; +export type ChatCostType = (typeof ChatCostType)[keyof typeof ChatCostType]; diff --git a/src/api/types/ChatCostsItem.ts b/src/api/types/ChatCostsItem.ts index 61fdbf86..f612a769 100644 --- a/src/api/types/ChatCostsItem.ts +++ b/src/api/types/ChatCostsItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ChatCostsItem = Vapi.ModelCost | Vapi.ChatCost; diff --git a/src/api/types/ChatEvalAssistantMessageEvaluation.ts b/src/api/types/ChatEvalAssistantMessageEvaluation.ts index 40807c22..09e0644d 100644 --- a/src/api/types/ChatEvalAssistantMessageEvaluation.ts +++ b/src/api/types/ChatEvalAssistantMessageEvaluation.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ChatEvalAssistantMessageEvaluation { /** @@ -10,7 +8,7 @@ export interface ChatEvalAssistantMessageEvaluation { * For an assistant message evaluation, the role is always 'assistant' * @default 'assistant' */ - role: "assistant"; + role: Vapi.ChatEvalAssistantMessageEvaluationRole; /** * 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. diff --git a/src/api/types/ChatEvalAssistantMessageEvaluationJudgePlan.ts b/src/api/types/ChatEvalAssistantMessageEvaluationJudgePlan.ts index 1f8f101b..26fb91a8 100644 --- a/src/api/types/ChatEvalAssistantMessageEvaluationJudgePlan.ts +++ b/src/api/types/ChatEvalAssistantMessageEvaluationJudgePlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the judge plan that instructs how to evaluate the assistant message. diff --git a/src/api/types/ChatEvalAssistantMessageEvaluationRole.ts b/src/api/types/ChatEvalAssistantMessageEvaluationRole.ts new file mode 100644 index 00000000..e1066969 --- /dev/null +++ b/src/api/types/ChatEvalAssistantMessageEvaluationRole.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the role of the message author. + * For an assistant message evaluation, the role is always 'assistant' + * @default 'assistant' + */ +export const ChatEvalAssistantMessageEvaluationRole = { + Assistant: "assistant", +} as const; +export type ChatEvalAssistantMessageEvaluationRole = + (typeof ChatEvalAssistantMessageEvaluationRole)[keyof typeof ChatEvalAssistantMessageEvaluationRole]; diff --git a/src/api/types/ChatEvalAssistantMessageMock.ts b/src/api/types/ChatEvalAssistantMessageMock.ts index 8e2c19af..2758eaf8 100644 --- a/src/api/types/ChatEvalAssistantMessageMock.ts +++ b/src/api/types/ChatEvalAssistantMessageMock.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ChatEvalAssistantMessageMock { /** @@ -10,7 +8,7 @@ export interface ChatEvalAssistantMessageMock { * For a mock assistant message, the role is always 'assistant' * @default 'assistant' */ - role: "assistant"; + role: Vapi.ChatEvalAssistantMessageMockRole; /** * This is the content of the assistant message. * This is the message that the assistant would have sent. diff --git a/src/api/types/ChatEvalAssistantMessageMockRole.ts b/src/api/types/ChatEvalAssistantMessageMockRole.ts new file mode 100644 index 00000000..1edecd4b --- /dev/null +++ b/src/api/types/ChatEvalAssistantMessageMockRole.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the role of the message author. + * For a mock assistant message, the role is always 'assistant' + * @default 'assistant' + */ +export const ChatEvalAssistantMessageMockRole = { + Assistant: "assistant", +} as const; +export type ChatEvalAssistantMessageMockRole = + (typeof ChatEvalAssistantMessageMockRole)[keyof typeof ChatEvalAssistantMessageMockRole]; diff --git a/src/api/types/ChatEvalAssistantMessageMockToolCall.ts b/src/api/types/ChatEvalAssistantMessageMockToolCall.ts index 915135ec..5381b0ed 100644 --- a/src/api/types/ChatEvalAssistantMessageMockToolCall.ts +++ b/src/api/types/ChatEvalAssistantMessageMockToolCall.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ChatEvalAssistantMessageMockToolCall { /** diff --git a/src/api/types/ChatEvalSystemMessageMock.ts b/src/api/types/ChatEvalSystemMessageMock.ts index b394d4fb..4af1e411 100644 --- a/src/api/types/ChatEvalSystemMessageMock.ts +++ b/src/api/types/ChatEvalSystemMessageMock.ts @@ -1,6 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ChatEvalSystemMessageMock { /** @@ -8,7 +8,7 @@ export interface ChatEvalSystemMessageMock { * For a mock system message, the role is always 'system' * @default 'system' */ - role: "system"; + role: Vapi.ChatEvalSystemMessageMockRole; /** * 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. diff --git a/src/api/types/ChatEvalSystemMessageMockRole.ts b/src/api/types/ChatEvalSystemMessageMockRole.ts new file mode 100644 index 00000000..e42ebe1e --- /dev/null +++ b/src/api/types/ChatEvalSystemMessageMockRole.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the role of the message author. + * For a mock system message, the role is always 'system' + * @default 'system' + */ +export const ChatEvalSystemMessageMockRole = { + System: "system", +} as const; +export type ChatEvalSystemMessageMockRole = + (typeof ChatEvalSystemMessageMockRole)[keyof typeof ChatEvalSystemMessageMockRole]; diff --git a/src/api/types/ChatEvalToolResponseMessageEvaluation.ts b/src/api/types/ChatEvalToolResponseMessageEvaluation.ts new file mode 100644 index 00000000..cdbfead3 --- /dev/null +++ b/src/api/types/ChatEvalToolResponseMessageEvaluation.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface ChatEvalToolResponseMessageEvaluation { + /** + * This is the role of the message author. + * For a tool response message evaluation, the role is always 'tool' + * @default 'tool' + */ + role: Vapi.ChatEvalToolResponseMessageEvaluationRole; + /** + * This is the judge plan that instructs how to evaluate the tool response message. + * The tool response message can be evaluated with an LLM-as-judge by defining the evaluation criteria in a prompt. + */ + judgePlan: Vapi.AssistantMessageJudgePlanAi; +} diff --git a/src/api/types/ChatEvalToolResponseMessageEvaluationRole.ts b/src/api/types/ChatEvalToolResponseMessageEvaluationRole.ts new file mode 100644 index 00000000..f7a10947 --- /dev/null +++ b/src/api/types/ChatEvalToolResponseMessageEvaluationRole.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the role of the message author. + * For a tool response message evaluation, the role is always 'tool' + * @default 'tool' + */ +export const ChatEvalToolResponseMessageEvaluationRole = { + Tool: "tool", +} as const; +export type ChatEvalToolResponseMessageEvaluationRole = + (typeof ChatEvalToolResponseMessageEvaluationRole)[keyof typeof ChatEvalToolResponseMessageEvaluationRole]; diff --git a/src/api/types/ChatEvalToolResponseMessageMock.ts b/src/api/types/ChatEvalToolResponseMessageMock.ts index a53211f2..9f998645 100644 --- a/src/api/types/ChatEvalToolResponseMessageMock.ts +++ b/src/api/types/ChatEvalToolResponseMessageMock.ts @@ -1,6 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ChatEvalToolResponseMessageMock { /** @@ -8,7 +8,7 @@ export interface ChatEvalToolResponseMessageMock { * For a mock tool response message, the role is always 'tool' * @default 'tool' */ - role: "tool"; + role: Vapi.ChatEvalToolResponseMessageMockRole; /** This is the content of the tool response message. JSON Objects should be stringified. */ content: string; } diff --git a/src/api/types/ChatEvalToolResponseMessageMockRole.ts b/src/api/types/ChatEvalToolResponseMessageMockRole.ts new file mode 100644 index 00000000..ac20f1ca --- /dev/null +++ b/src/api/types/ChatEvalToolResponseMessageMockRole.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the role of the message author. + * For a mock tool response message, the role is always 'tool' + * @default 'tool' + */ +export const ChatEvalToolResponseMessageMockRole = { + Tool: "tool", +} as const; +export type ChatEvalToolResponseMessageMockRole = + (typeof ChatEvalToolResponseMessageMockRole)[keyof typeof ChatEvalToolResponseMessageMockRole]; diff --git a/src/api/types/ChatEvalUserMessageMock.ts b/src/api/types/ChatEvalUserMessageMock.ts index 2f26ae46..5639fc6c 100644 --- a/src/api/types/ChatEvalUserMessageMock.ts +++ b/src/api/types/ChatEvalUserMessageMock.ts @@ -1,6 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ChatEvalUserMessageMock { /** @@ -8,7 +8,7 @@ export interface ChatEvalUserMessageMock { * For a mock user message, the role is always 'user' * @default 'user' */ - role: "user"; + role: Vapi.ChatEvalUserMessageMockRole; /** * This is the content of the user message. * This is the message that the user would have sent. diff --git a/src/api/types/ChatEvalUserMessageMockRole.ts b/src/api/types/ChatEvalUserMessageMockRole.ts new file mode 100644 index 00000000..b1216404 --- /dev/null +++ b/src/api/types/ChatEvalUserMessageMockRole.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the role of the message author. + * For a mock user message, the role is always 'user' + * @default 'user' + */ +export const ChatEvalUserMessageMockRole = { + User: "user", +} as const; +export type ChatEvalUserMessageMockRole = + (typeof ChatEvalUserMessageMockRole)[keyof typeof ChatEvalUserMessageMockRole]; diff --git a/src/api/types/ChatInput.ts b/src/api/types/ChatInput.ts index e3715607..fadc10e1 100644 --- a/src/api/types/ChatInput.ts +++ b/src/api/types/ChatInput.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the input text for the chat. * Can be a string or an array of chat messages. */ -export type ChatInput = string | Vapi.ChatInputItem[]; +export type ChatInput = string | Vapi.ChatInputOneItem[]; diff --git a/src/api/types/ChatInputItem.ts b/src/api/types/ChatInputItem.ts deleted file mode 100644 index ab6c7455..00000000 --- a/src/api/types/ChatInputItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index.js"; - -export type ChatInputItem = - | Vapi.SystemMessage - | Vapi.UserMessage - | Vapi.AssistantMessage - | Vapi.ToolMessage - | Vapi.DeveloperMessage; diff --git a/src/api/types/ChatInputOneItem.ts b/src/api/types/ChatInputOneItem.ts new file mode 100644 index 00000000..2f3b34c8 --- /dev/null +++ b/src/api/types/ChatInputOneItem.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type ChatInputOneItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/ChatMessagesItem.ts b/src/api/types/ChatMessagesItem.ts index 2f04960c..90fbacbc 100644 --- a/src/api/types/ChatMessagesItem.ts +++ b/src/api/types/ChatMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ChatMessagesItem = | Vapi.SystemMessage diff --git a/src/api/types/ChatOutputItem.ts b/src/api/types/ChatOutputItem.ts index bbcaebcc..1722fec8 100644 --- a/src/api/types/ChatOutputItem.ts +++ b/src/api/types/ChatOutputItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ChatOutputItem = | Vapi.SystemMessage diff --git a/src/api/types/ChatPaginatedResponse.ts b/src/api/types/ChatPaginatedResponse.ts index ab2821bb..441cf6f0 100644 --- a/src/api/types/ChatPaginatedResponse.ts +++ b/src/api/types/ChatPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ChatPaginatedResponse { results: Vapi.Chat[]; diff --git a/src/api/types/ChunkPlan.ts b/src/api/types/ChunkPlan.ts index 8ca9c3a6..b41a7909 100644 --- a/src/api/types/ChunkPlan.ts +++ b/src/api/types/ChunkPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ChunkPlan { /** diff --git a/src/api/types/ClientInboundMessage.ts b/src/api/types/ClientInboundMessage.ts index cb39b133..99de763b 100644 --- a/src/api/types/ClientInboundMessage.ts +++ b/src/api/types/ClientInboundMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientInboundMessage { /** These are the messages that can be sent from client-side SDKs to control the call. */ diff --git a/src/api/types/ClientInboundMessageAddMessage.ts b/src/api/types/ClientInboundMessageAddMessage.ts index 09ec68f7..ea974373 100644 --- a/src/api/types/ClientInboundMessageAddMessage.ts +++ b/src/api/types/ClientInboundMessageAddMessage.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientInboundMessageAddMessage { /** This is the type of the message. Send "add-message" message to add a message to the conversation history. */ - type: "add-message"; + type: Vapi.ClientInboundMessageAddMessageType; /** This is the message to add to the conversation. */ message: Vapi.OpenAiMessage; /** diff --git a/src/api/types/ClientInboundMessageAddMessageType.ts b/src/api/types/ClientInboundMessageAddMessageType.ts new file mode 100644 index 00000000..35f60d33 --- /dev/null +++ b/src/api/types/ClientInboundMessageAddMessageType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. Send "add-message" message to add a message to the conversation history. */ +export const ClientInboundMessageAddMessageType = { + AddMessage: "add-message", +} as const; +export type ClientInboundMessageAddMessageType = + (typeof ClientInboundMessageAddMessageType)[keyof typeof ClientInboundMessageAddMessageType]; diff --git a/src/api/types/ClientInboundMessageControl.ts b/src/api/types/ClientInboundMessageControl.ts index c26a0b4b..16bcb389 100644 --- a/src/api/types/ClientInboundMessageControl.ts +++ b/src/api/types/ClientInboundMessageControl.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientInboundMessageControl { /** @@ -13,7 +11,7 @@ export interface ClientInboundMessageControl { * - "unmute-customer" - unmute the user * - "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) */ - type: "control"; + type: Vapi.ClientInboundMessageControlType; /** This is the control action */ control: Vapi.ClientInboundMessageControlControl; } diff --git a/src/api/types/ClientInboundMessageControlControl.ts b/src/api/types/ClientInboundMessageControlControl.ts index 91f95686..da9909f4 100644 --- a/src/api/types/ClientInboundMessageControlControl.ts +++ b/src/api/types/ClientInboundMessageControlControl.ts @@ -1,16 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the control action - */ -export type ClientInboundMessageControlControl = - | "mute-assistant" - | "unmute-assistant" - | "mute-customer" - | "unmute-customer" - | "say-first-message"; +/** This is the control action */ export const ClientInboundMessageControlControl = { MuteAssistant: "mute-assistant", UnmuteAssistant: "unmute-assistant", @@ -18,3 +8,5 @@ export const ClientInboundMessageControlControl = { UnmuteCustomer: "unmute-customer", SayFirstMessage: "say-first-message", } as const; +export type ClientInboundMessageControlControl = + (typeof ClientInboundMessageControlControl)[keyof typeof ClientInboundMessageControlControl]; diff --git a/src/api/types/ClientInboundMessageControlType.ts b/src/api/types/ClientInboundMessageControlType.ts new file mode 100644 index 00000000..1011cb58 --- /dev/null +++ b/src/api/types/ClientInboundMessageControlType.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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 + * - "mute-customer" - mute the user + * - "unmute-customer" - unmute the user + * - "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) + */ +export const ClientInboundMessageControlType = { + Control: "control", +} as const; +export type ClientInboundMessageControlType = + (typeof ClientInboundMessageControlType)[keyof typeof ClientInboundMessageControlType]; diff --git a/src/api/types/ClientInboundMessageEndCall.ts b/src/api/types/ClientInboundMessageEndCall.ts index 9b2fb8af..915c2663 100644 --- a/src/api/types/ClientInboundMessageEndCall.ts +++ b/src/api/types/ClientInboundMessageEndCall.ts @@ -1,8 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ClientInboundMessageEndCall { /** This is the type of the message. Send "end-call" message to end the call. */ - type: "end-call"; + type: Vapi.ClientInboundMessageEndCallType; } diff --git a/src/api/types/ClientInboundMessageEndCallType.ts b/src/api/types/ClientInboundMessageEndCallType.ts new file mode 100644 index 00000000..c3e59e2e --- /dev/null +++ b/src/api/types/ClientInboundMessageEndCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. Send "end-call" message to end the call. */ +export const ClientInboundMessageEndCallType = { + EndCall: "end-call", +} as const; +export type ClientInboundMessageEndCallType = + (typeof ClientInboundMessageEndCallType)[keyof typeof ClientInboundMessageEndCallType]; diff --git a/src/api/types/ClientInboundMessageMessage.ts b/src/api/types/ClientInboundMessageMessage.ts index 2a41b195..aa61ad44 100644 --- a/src/api/types/ClientInboundMessageMessage.ts +++ b/src/api/types/ClientInboundMessageMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the messages that can be sent from client-side SDKs to control the call. diff --git a/src/api/types/ClientInboundMessageSay.ts b/src/api/types/ClientInboundMessageSay.ts index bba3bc4d..95bf5420 100644 --- a/src/api/types/ClientInboundMessageSay.ts +++ b/src/api/types/ClientInboundMessageSay.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ClientInboundMessageSay { /** This is the type of the message. Send "say" message to make the assistant say something. */ - type?: "say"; + type?: Vapi.ClientInboundMessageSayType; /** * This is the flag for whether the message should replace existing assistant speech. * diff --git a/src/api/types/ClientInboundMessageSayType.ts b/src/api/types/ClientInboundMessageSayType.ts new file mode 100644 index 00000000..dfbc2292 --- /dev/null +++ b/src/api/types/ClientInboundMessageSayType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. Send "say" message to make the assistant say something. */ +export const ClientInboundMessageSayType = { + Say: "say", +} as const; +export type ClientInboundMessageSayType = + (typeof ClientInboundMessageSayType)[keyof typeof ClientInboundMessageSayType]; diff --git a/src/api/types/ClientInboundMessageTransfer.ts b/src/api/types/ClientInboundMessageTransfer.ts index 64c5d2f5..86eb803a 100644 --- a/src/api/types/ClientInboundMessageTransfer.ts +++ b/src/api/types/ClientInboundMessageTransfer.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientInboundMessageTransfer { /** This is the type of the message. Send "transfer" message to transfer the call to a destination. */ - type: "transfer"; + type: Vapi.ClientInboundMessageTransferType; /** This is the destination to transfer the call to. */ destination?: Vapi.ClientInboundMessageTransferDestination; /** This is the content to say. */ diff --git a/src/api/types/ClientInboundMessageTransferDestination.ts b/src/api/types/ClientInboundMessageTransferDestination.ts index 43d9e30a..3a09a55f 100644 --- a/src/api/types/ClientInboundMessageTransferDestination.ts +++ b/src/api/types/ClientInboundMessageTransferDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination to transfer the call to. diff --git a/src/api/types/ClientInboundMessageTransferType.ts b/src/api/types/ClientInboundMessageTransferType.ts new file mode 100644 index 00000000..128aea1f --- /dev/null +++ b/src/api/types/ClientInboundMessageTransferType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. Send "transfer" message to transfer the call to a destination. */ +export const ClientInboundMessageTransferType = { + Transfer: "transfer", +} as const; +export type ClientInboundMessageTransferType = + (typeof ClientInboundMessageTransferType)[keyof typeof ClientInboundMessageTransferType]; diff --git a/src/api/types/ClientMessage.ts b/src/api/types/ClientMessage.ts index 0d29fe44..e7496a2b 100644 --- a/src/api/types/ClientMessage.ts +++ b/src/api/types/ClientMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessage { /** 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`. */ diff --git a/src/api/types/ClientMessageAssistantStarted.ts b/src/api/types/ClientMessageAssistantStarted.ts new file mode 100644 index 00000000..de3361e1 --- /dev/null +++ b/src/api/types/ClientMessageAssistantStarted.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface ClientMessageAssistantStarted { + /** This is the phone number that the message is associated with. */ + phoneNumber?: Vapi.ClientMessageAssistantStartedPhoneNumber; + /** This is the type of the message. "assistant.started" is sent when the assistant is started. */ + type: Vapi.ClientMessageAssistantStartedType; + /** This is the timestamp of the message. */ + timestamp?: number; + /** This is the call that the message is associated with. */ + call?: Vapi.Call; + /** This is the customer that the message is associated with. */ + customer?: Vapi.CreateCustomerDto; + /** This is the assistant that the message is associated with. */ + assistant?: Vapi.CreateAssistantDto; + /** This is the assistant that was updated. */ + newAssistant: Vapi.CreateAssistantDto; +} diff --git a/src/api/types/ClientMessageAssistantStartedPhoneNumber.ts b/src/api/types/ClientMessageAssistantStartedPhoneNumber.ts new file mode 100644 index 00000000..2eebf0eb --- /dev/null +++ b/src/api/types/ClientMessageAssistantStartedPhoneNumber.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +/** + * This is the phone number that the message is associated with. + */ +export type ClientMessageAssistantStartedPhoneNumber = + | Vapi.CreateByoPhoneNumberDto + | Vapi.CreateTwilioPhoneNumberDto + | Vapi.CreateVonagePhoneNumberDto + | Vapi.CreateVapiPhoneNumberDto + | Vapi.CreateTelnyxPhoneNumberDto; diff --git a/src/api/types/ClientMessageAssistantStartedType.ts b/src/api/types/ClientMessageAssistantStartedType.ts new file mode 100644 index 00000000..5c47c2ba --- /dev/null +++ b/src/api/types/ClientMessageAssistantStartedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "assistant.started" is sent when the assistant is started. */ +export const ClientMessageAssistantStartedType = { + AssistantStarted: "assistant.started", +} as const; +export type ClientMessageAssistantStartedType = + (typeof ClientMessageAssistantStartedType)[keyof typeof ClientMessageAssistantStartedType]; diff --git a/src/api/types/ClientMessageCallDeleteFailed.ts b/src/api/types/ClientMessageCallDeleteFailed.ts index c75e79c7..2d60cb70 100644 --- a/src/api/types/ClientMessageCallDeleteFailed.ts +++ b/src/api/types/ClientMessageCallDeleteFailed.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageCallDeleteFailed { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageCallDeleteFailedPhoneNumber; /** This is the type of the message. "call.deleted" is sent when a call is deleted. */ - type: "call.delete.failed"; + type: Vapi.ClientMessageCallDeleteFailedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageCallDeleteFailedPhoneNumber.ts b/src/api/types/ClientMessageCallDeleteFailedPhoneNumber.ts index beb54654..373693a8 100644 --- a/src/api/types/ClientMessageCallDeleteFailedPhoneNumber.ts +++ b/src/api/types/ClientMessageCallDeleteFailedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageCallDeleteFailedType.ts b/src/api/types/ClientMessageCallDeleteFailedType.ts new file mode 100644 index 00000000..64e28a2a --- /dev/null +++ b/src/api/types/ClientMessageCallDeleteFailedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "call.deleted" is sent when a call is deleted. */ +export const ClientMessageCallDeleteFailedType = { + CallDeleteFailed: "call.delete.failed", +} as const; +export type ClientMessageCallDeleteFailedType = + (typeof ClientMessageCallDeleteFailedType)[keyof typeof ClientMessageCallDeleteFailedType]; diff --git a/src/api/types/ClientMessageCallDeleted.ts b/src/api/types/ClientMessageCallDeleted.ts index 23331be2..5bde2d65 100644 --- a/src/api/types/ClientMessageCallDeleted.ts +++ b/src/api/types/ClientMessageCallDeleted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageCallDeleted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageCallDeletedPhoneNumber; /** This is the type of the message. "call.deleted" is sent when a call is deleted. */ - type: "call.deleted"; + type: Vapi.ClientMessageCallDeletedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageCallDeletedPhoneNumber.ts b/src/api/types/ClientMessageCallDeletedPhoneNumber.ts index f5b3f6ba..cfc2da91 100644 --- a/src/api/types/ClientMessageCallDeletedPhoneNumber.ts +++ b/src/api/types/ClientMessageCallDeletedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageCallDeletedType.ts b/src/api/types/ClientMessageCallDeletedType.ts new file mode 100644 index 00000000..a7a3cead --- /dev/null +++ b/src/api/types/ClientMessageCallDeletedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "call.deleted" is sent when a call is deleted. */ +export const ClientMessageCallDeletedType = { + CallDeleted: "call.deleted", +} as const; +export type ClientMessageCallDeletedType = + (typeof ClientMessageCallDeletedType)[keyof typeof ClientMessageCallDeletedType]; diff --git a/src/api/types/ClientMessageChatCreated.ts b/src/api/types/ClientMessageChatCreated.ts index cca7608e..258308bf 100644 --- a/src/api/types/ClientMessageChatCreated.ts +++ b/src/api/types/ClientMessageChatCreated.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageChatCreated { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageChatCreatedPhoneNumber; /** This is the type of the message. "chat.created" is sent when a new chat is created. */ - type: "chat.created"; + type: Vapi.ClientMessageChatCreatedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageChatCreatedPhoneNumber.ts b/src/api/types/ClientMessageChatCreatedPhoneNumber.ts index 3f83bdb1..6cd3ceeb 100644 --- a/src/api/types/ClientMessageChatCreatedPhoneNumber.ts +++ b/src/api/types/ClientMessageChatCreatedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageChatCreatedType.ts b/src/api/types/ClientMessageChatCreatedType.ts new file mode 100644 index 00000000..0c11b2bc --- /dev/null +++ b/src/api/types/ClientMessageChatCreatedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "chat.created" is sent when a new chat is created. */ +export const ClientMessageChatCreatedType = { + ChatCreated: "chat.created", +} as const; +export type ClientMessageChatCreatedType = + (typeof ClientMessageChatCreatedType)[keyof typeof ClientMessageChatCreatedType]; diff --git a/src/api/types/ClientMessageChatDeleted.ts b/src/api/types/ClientMessageChatDeleted.ts index 8f60ea2c..33b3c116 100644 --- a/src/api/types/ClientMessageChatDeleted.ts +++ b/src/api/types/ClientMessageChatDeleted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageChatDeleted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageChatDeletedPhoneNumber; /** This is the type of the message. "chat.deleted" is sent when a chat is deleted. */ - type: "chat.deleted"; + type: Vapi.ClientMessageChatDeletedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageChatDeletedPhoneNumber.ts b/src/api/types/ClientMessageChatDeletedPhoneNumber.ts index 6165988a..69569e45 100644 --- a/src/api/types/ClientMessageChatDeletedPhoneNumber.ts +++ b/src/api/types/ClientMessageChatDeletedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageChatDeletedType.ts b/src/api/types/ClientMessageChatDeletedType.ts new file mode 100644 index 00000000..2811d4e3 --- /dev/null +++ b/src/api/types/ClientMessageChatDeletedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "chat.deleted" is sent when a chat is deleted. */ +export const ClientMessageChatDeletedType = { + ChatDeleted: "chat.deleted", +} as const; +export type ClientMessageChatDeletedType = + (typeof ClientMessageChatDeletedType)[keyof typeof ClientMessageChatDeletedType]; diff --git a/src/api/types/ClientMessageConversationUpdate.ts b/src/api/types/ClientMessageConversationUpdate.ts index 69ec167d..09fd3961 100644 --- a/src/api/types/ClientMessageConversationUpdate.ts +++ b/src/api/types/ClientMessageConversationUpdate.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageConversationUpdate { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageConversationUpdatePhoneNumber; /** This is the type of the message. "conversation-update" is sent when an update is committed to the conversation history. */ - type: "conversation-update"; + type: Vapi.ClientMessageConversationUpdateType; /** This is the most up-to-date conversation history at the time the message is sent. */ messages?: Vapi.ClientMessageConversationUpdateMessagesItem[]; /** This is the most up-to-date conversation history at the time the message is sent, formatted for OpenAI. */ diff --git a/src/api/types/ClientMessageConversationUpdateMessagesItem.ts b/src/api/types/ClientMessageConversationUpdateMessagesItem.ts index 7936f71b..3a5a5570 100644 --- a/src/api/types/ClientMessageConversationUpdateMessagesItem.ts +++ b/src/api/types/ClientMessageConversationUpdateMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ClientMessageConversationUpdateMessagesItem = | Vapi.UserMessage diff --git a/src/api/types/ClientMessageConversationUpdatePhoneNumber.ts b/src/api/types/ClientMessageConversationUpdatePhoneNumber.ts index 4e154492..cb7760b9 100644 --- a/src/api/types/ClientMessageConversationUpdatePhoneNumber.ts +++ b/src/api/types/ClientMessageConversationUpdatePhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageConversationUpdateType.ts b/src/api/types/ClientMessageConversationUpdateType.ts new file mode 100644 index 00000000..ecc5c5a7 --- /dev/null +++ b/src/api/types/ClientMessageConversationUpdateType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "conversation-update" is sent when an update is committed to the conversation history. */ +export const ClientMessageConversationUpdateType = { + ConversationUpdate: "conversation-update", +} as const; +export type ClientMessageConversationUpdateType = + (typeof ClientMessageConversationUpdateType)[keyof typeof ClientMessageConversationUpdateType]; diff --git a/src/api/types/ClientMessageHang.ts b/src/api/types/ClientMessageHang.ts index 31dacd9e..33ae24d7 100644 --- a/src/api/types/ClientMessageHang.ts +++ b/src/api/types/ClientMessageHang.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageHang { /** This is the phone number that the message is associated with. */ @@ -14,7 +12,7 @@ export interface ClientMessageHang { * - the tool call is still waiting for a response from your server * - etc. */ - type: "hang"; + type: Vapi.ClientMessageHangType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageHangPhoneNumber.ts b/src/api/types/ClientMessageHangPhoneNumber.ts index 5ebf6572..6e033254 100644 --- a/src/api/types/ClientMessageHangPhoneNumber.ts +++ b/src/api/types/ClientMessageHangPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageHangType.ts b/src/api/types/ClientMessageHangType.ts new file mode 100644 index 00000000..ff0c2dc1 --- /dev/null +++ b/src/api/types/ClientMessageHangType.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const ClientMessageHangType = { + Hang: "hang", +} as const; +export type ClientMessageHangType = (typeof ClientMessageHangType)[keyof typeof ClientMessageHangType]; diff --git a/src/api/types/ClientMessageLanguageChangeDetected.ts b/src/api/types/ClientMessageLanguageChangeDetected.ts index 2ba095cf..aae5965a 100644 --- a/src/api/types/ClientMessageLanguageChangeDetected.ts +++ b/src/api/types/ClientMessageLanguageChangeDetected.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageLanguageChangeDetected { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageLanguageChangeDetectedPhoneNumber; /** This is the type of the message. "language-change-detected" is sent when the transcriber is automatically switched based on the detected language. */ - type: "language-change-detected"; + type: Vapi.ClientMessageLanguageChangeDetectedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageLanguageChangeDetectedPhoneNumber.ts b/src/api/types/ClientMessageLanguageChangeDetectedPhoneNumber.ts index 1ac83510..a3aeda9c 100644 --- a/src/api/types/ClientMessageLanguageChangeDetectedPhoneNumber.ts +++ b/src/api/types/ClientMessageLanguageChangeDetectedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageLanguageChangeDetectedType.ts b/src/api/types/ClientMessageLanguageChangeDetectedType.ts new file mode 100644 index 00000000..39f95305 --- /dev/null +++ b/src/api/types/ClientMessageLanguageChangeDetectedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "language-change-detected" is sent when the transcriber is automatically switched based on the detected language. */ +export const ClientMessageLanguageChangeDetectedType = { + LanguageChangeDetected: "language-change-detected", +} as const; +export type ClientMessageLanguageChangeDetectedType = + (typeof ClientMessageLanguageChangeDetectedType)[keyof typeof ClientMessageLanguageChangeDetectedType]; diff --git a/src/api/types/ClientMessageMessage.ts b/src/api/types/ClientMessageMessage.ts index 8bf6761c..4da52499 100644 --- a/src/api/types/ClientMessageMessage.ts +++ b/src/api/types/ClientMessageMessage.ts @@ -1,14 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * 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`. */ export type ClientMessageMessage = | Vapi.ClientMessageWorkflowNodeStarted + | Vapi.ClientMessageAssistantStarted | Vapi.ClientMessageConversationUpdate | Vapi.ClientMessageHang | Vapi.ClientMessageMetadata diff --git a/src/api/types/ClientMessageMetadata.ts b/src/api/types/ClientMessageMetadata.ts index 12db9b0c..50eb6cc4 100644 --- a/src/api/types/ClientMessageMetadata.ts +++ b/src/api/types/ClientMessageMetadata.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageMetadata { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageMetadataPhoneNumber; /** This is the type of the message. "metadata" is sent to forward metadata to the client. */ - type: "metadata"; + type: Vapi.ClientMessageMetadataType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageMetadataPhoneNumber.ts b/src/api/types/ClientMessageMetadataPhoneNumber.ts index ae074fe8..d3bbad21 100644 --- a/src/api/types/ClientMessageMetadataPhoneNumber.ts +++ b/src/api/types/ClientMessageMetadataPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageMetadataType.ts b/src/api/types/ClientMessageMetadataType.ts new file mode 100644 index 00000000..988489ab --- /dev/null +++ b/src/api/types/ClientMessageMetadataType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "metadata" is sent to forward metadata to the client. */ +export const ClientMessageMetadataType = { + Metadata: "metadata", +} as const; +export type ClientMessageMetadataType = (typeof ClientMessageMetadataType)[keyof typeof ClientMessageMetadataType]; diff --git a/src/api/types/ClientMessageModelOutput.ts b/src/api/types/ClientMessageModelOutput.ts index 2a2d5a33..169eb067 100644 --- a/src/api/types/ClientMessageModelOutput.ts +++ b/src/api/types/ClientMessageModelOutput.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageModelOutput { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageModelOutputPhoneNumber; /** This is the type of the message. "model-output" is sent as the model outputs tokens. */ - type: "model-output"; + type: Vapi.ClientMessageModelOutputType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageModelOutputPhoneNumber.ts b/src/api/types/ClientMessageModelOutputPhoneNumber.ts index e6ed36bf..49105c5d 100644 --- a/src/api/types/ClientMessageModelOutputPhoneNumber.ts +++ b/src/api/types/ClientMessageModelOutputPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageModelOutputType.ts b/src/api/types/ClientMessageModelOutputType.ts new file mode 100644 index 00000000..897ffde8 --- /dev/null +++ b/src/api/types/ClientMessageModelOutputType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "model-output" is sent as the model outputs tokens. */ +export const ClientMessageModelOutputType = { + ModelOutput: "model-output", +} as const; +export type ClientMessageModelOutputType = + (typeof ClientMessageModelOutputType)[keyof typeof ClientMessageModelOutputType]; diff --git a/src/api/types/ClientMessageSessionCreated.ts b/src/api/types/ClientMessageSessionCreated.ts index 2a7ff2ac..6fd99c8d 100644 --- a/src/api/types/ClientMessageSessionCreated.ts +++ b/src/api/types/ClientMessageSessionCreated.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageSessionCreated { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageSessionCreatedPhoneNumber; /** This is the type of the message. "session.created" is sent when a new session is created. */ - type: "session.created"; + type: Vapi.ClientMessageSessionCreatedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageSessionCreatedPhoneNumber.ts b/src/api/types/ClientMessageSessionCreatedPhoneNumber.ts index 1ab7f1bb..38e29291 100644 --- a/src/api/types/ClientMessageSessionCreatedPhoneNumber.ts +++ b/src/api/types/ClientMessageSessionCreatedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageSessionCreatedType.ts b/src/api/types/ClientMessageSessionCreatedType.ts new file mode 100644 index 00000000..269b7878 --- /dev/null +++ b/src/api/types/ClientMessageSessionCreatedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "session.created" is sent when a new session is created. */ +export const ClientMessageSessionCreatedType = { + SessionCreated: "session.created", +} as const; +export type ClientMessageSessionCreatedType = + (typeof ClientMessageSessionCreatedType)[keyof typeof ClientMessageSessionCreatedType]; diff --git a/src/api/types/ClientMessageSessionDeleted.ts b/src/api/types/ClientMessageSessionDeleted.ts index 4d968cb3..85828fc8 100644 --- a/src/api/types/ClientMessageSessionDeleted.ts +++ b/src/api/types/ClientMessageSessionDeleted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageSessionDeleted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageSessionDeletedPhoneNumber; /** This is the type of the message. "session.deleted" is sent when a session is deleted. */ - type: "session.deleted"; + type: Vapi.ClientMessageSessionDeletedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageSessionDeletedPhoneNumber.ts b/src/api/types/ClientMessageSessionDeletedPhoneNumber.ts index 260b7a6a..3fc455ba 100644 --- a/src/api/types/ClientMessageSessionDeletedPhoneNumber.ts +++ b/src/api/types/ClientMessageSessionDeletedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageSessionDeletedType.ts b/src/api/types/ClientMessageSessionDeletedType.ts new file mode 100644 index 00000000..9eae12f3 --- /dev/null +++ b/src/api/types/ClientMessageSessionDeletedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "session.deleted" is sent when a session is deleted. */ +export const ClientMessageSessionDeletedType = { + SessionDeleted: "session.deleted", +} as const; +export type ClientMessageSessionDeletedType = + (typeof ClientMessageSessionDeletedType)[keyof typeof ClientMessageSessionDeletedType]; diff --git a/src/api/types/ClientMessageSessionUpdated.ts b/src/api/types/ClientMessageSessionUpdated.ts index 633fb0ba..719e09ca 100644 --- a/src/api/types/ClientMessageSessionUpdated.ts +++ b/src/api/types/ClientMessageSessionUpdated.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageSessionUpdated { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageSessionUpdatedPhoneNumber; /** This is the type of the message. "session.updated" is sent when a session is updated. */ - type: "session.updated"; + type: Vapi.ClientMessageSessionUpdatedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageSessionUpdatedPhoneNumber.ts b/src/api/types/ClientMessageSessionUpdatedPhoneNumber.ts index d4d8d9c9..3d8619b1 100644 --- a/src/api/types/ClientMessageSessionUpdatedPhoneNumber.ts +++ b/src/api/types/ClientMessageSessionUpdatedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageSessionUpdatedType.ts b/src/api/types/ClientMessageSessionUpdatedType.ts new file mode 100644 index 00000000..b197b189 --- /dev/null +++ b/src/api/types/ClientMessageSessionUpdatedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "session.updated" is sent when a session is updated. */ +export const ClientMessageSessionUpdatedType = { + SessionUpdated: "session.updated", +} as const; +export type ClientMessageSessionUpdatedType = + (typeof ClientMessageSessionUpdatedType)[keyof typeof ClientMessageSessionUpdatedType]; diff --git a/src/api/types/ClientMessageSpeechUpdate.ts b/src/api/types/ClientMessageSpeechUpdate.ts index c53acdd9..5e7c8743 100644 --- a/src/api/types/ClientMessageSpeechUpdate.ts +++ b/src/api/types/ClientMessageSpeechUpdate.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageSpeechUpdate { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageSpeechUpdatePhoneNumber; /** This is the type of the message. "speech-update" is sent whenever assistant or user start or stop speaking. */ - type: "speech-update"; + type: Vapi.ClientMessageSpeechUpdateType; /** This is the status of the speech update. */ status: Vapi.ClientMessageSpeechUpdateStatus; /** This is the role which the speech update is for. */ diff --git a/src/api/types/ClientMessageSpeechUpdatePhoneNumber.ts b/src/api/types/ClientMessageSpeechUpdatePhoneNumber.ts index d5b9ab0f..c5999902 100644 --- a/src/api/types/ClientMessageSpeechUpdatePhoneNumber.ts +++ b/src/api/types/ClientMessageSpeechUpdatePhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageSpeechUpdateRole.ts b/src/api/types/ClientMessageSpeechUpdateRole.ts index f4d826d9..545f4c62 100644 --- a/src/api/types/ClientMessageSpeechUpdateRole.ts +++ b/src/api/types/ClientMessageSpeechUpdateRole.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the role which the speech update is for. - */ -export type ClientMessageSpeechUpdateRole = "assistant" | "user"; +/** This is the role which the speech update is for. */ export const ClientMessageSpeechUpdateRole = { Assistant: "assistant", User: "user", } as const; +export type ClientMessageSpeechUpdateRole = + (typeof ClientMessageSpeechUpdateRole)[keyof typeof ClientMessageSpeechUpdateRole]; diff --git a/src/api/types/ClientMessageSpeechUpdateStatus.ts b/src/api/types/ClientMessageSpeechUpdateStatus.ts index c5368c7c..c62bbcd7 100644 --- a/src/api/types/ClientMessageSpeechUpdateStatus.ts +++ b/src/api/types/ClientMessageSpeechUpdateStatus.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the speech update. - */ -export type ClientMessageSpeechUpdateStatus = "started" | "stopped"; +/** This is the status of the speech update. */ export const ClientMessageSpeechUpdateStatus = { Started: "started", Stopped: "stopped", } as const; +export type ClientMessageSpeechUpdateStatus = + (typeof ClientMessageSpeechUpdateStatus)[keyof typeof ClientMessageSpeechUpdateStatus]; diff --git a/src/api/types/ClientMessageSpeechUpdateType.ts b/src/api/types/ClientMessageSpeechUpdateType.ts new file mode 100644 index 00000000..fde46bb0 --- /dev/null +++ b/src/api/types/ClientMessageSpeechUpdateType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "speech-update" is sent whenever assistant or user start or stop speaking. */ +export const ClientMessageSpeechUpdateType = { + SpeechUpdate: "speech-update", +} as const; +export type ClientMessageSpeechUpdateType = + (typeof ClientMessageSpeechUpdateType)[keyof typeof ClientMessageSpeechUpdateType]; diff --git a/src/api/types/ClientMessageToolCalls.ts b/src/api/types/ClientMessageToolCalls.ts index 5471cb30..b18c1ad1 100644 --- a/src/api/types/ClientMessageToolCalls.ts +++ b/src/api/types/ClientMessageToolCalls.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageToolCalls { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageToolCallsPhoneNumber; /** This is the type of the message. "tool-calls" is sent to call a tool. */ - type?: "tool-calls"; + type?: Vapi.ClientMessageToolCallsType; /** This is the list of tools calls that the model is requesting along with the original tool configuration. */ toolWithToolCallList: Vapi.ClientMessageToolCallsToolWithToolCallListItem[]; /** This is the timestamp of the message. */ diff --git a/src/api/types/ClientMessageToolCallsPhoneNumber.ts b/src/api/types/ClientMessageToolCallsPhoneNumber.ts index afddd61b..4bd5618f 100644 --- a/src/api/types/ClientMessageToolCallsPhoneNumber.ts +++ b/src/api/types/ClientMessageToolCallsPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageToolCallsResult.ts b/src/api/types/ClientMessageToolCallsResult.ts index e716cdd2..f8bb071d 100644 --- a/src/api/types/ClientMessageToolCallsResult.ts +++ b/src/api/types/ClientMessageToolCallsResult.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageToolCallsResult { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageToolCallsResultPhoneNumber; /** This is the type of the message. "tool-calls-result" is sent to forward the result of a tool call to the client. */ - type: "tool-calls-result"; + type: Vapi.ClientMessageToolCallsResultType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageToolCallsResultPhoneNumber.ts b/src/api/types/ClientMessageToolCallsResultPhoneNumber.ts index 039114c4..f13a4cde 100644 --- a/src/api/types/ClientMessageToolCallsResultPhoneNumber.ts +++ b/src/api/types/ClientMessageToolCallsResultPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageToolCallsResultType.ts b/src/api/types/ClientMessageToolCallsResultType.ts new file mode 100644 index 00000000..42866df5 --- /dev/null +++ b/src/api/types/ClientMessageToolCallsResultType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "tool-calls-result" is sent to forward the result of a tool call to the client. */ +export const ClientMessageToolCallsResultType = { + ToolCallsResult: "tool-calls-result", +} as const; +export type ClientMessageToolCallsResultType = + (typeof ClientMessageToolCallsResultType)[keyof typeof ClientMessageToolCallsResultType]; diff --git a/src/api/types/ClientMessageToolCallsToolWithToolCallListItem.ts b/src/api/types/ClientMessageToolCallsToolWithToolCallListItem.ts index 88b694e4..8e548ddd 100644 --- a/src/api/types/ClientMessageToolCallsToolWithToolCallListItem.ts +++ b/src/api/types/ClientMessageToolCallsToolWithToolCallListItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ClientMessageToolCallsToolWithToolCallListItem = | Vapi.FunctionToolWithToolCall diff --git a/src/api/types/ClientMessageToolCallsType.ts b/src/api/types/ClientMessageToolCallsType.ts new file mode 100644 index 00000000..35023802 --- /dev/null +++ b/src/api/types/ClientMessageToolCallsType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "tool-calls" is sent to call a tool. */ +export const ClientMessageToolCallsType = { + ToolCalls: "tool-calls", +} as const; +export type ClientMessageToolCallsType = (typeof ClientMessageToolCallsType)[keyof typeof ClientMessageToolCallsType]; diff --git a/src/api/types/ClientMessageTranscript.ts b/src/api/types/ClientMessageTranscript.ts index 8fddbffb..30a7a51a 100644 --- a/src/api/types/ClientMessageTranscript.ts +++ b/src/api/types/ClientMessageTranscript.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageTranscript { /** This is the phone number that the message is associated with. */ diff --git a/src/api/types/ClientMessageTranscriptPhoneNumber.ts b/src/api/types/ClientMessageTranscriptPhoneNumber.ts index 02983eae..123acc68 100644 --- a/src/api/types/ClientMessageTranscriptPhoneNumber.ts +++ b/src/api/types/ClientMessageTranscriptPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageTranscriptRole.ts b/src/api/types/ClientMessageTranscriptRole.ts index 4f93604d..07ab7422 100644 --- a/src/api/types/ClientMessageTranscriptRole.ts +++ b/src/api/types/ClientMessageTranscriptRole.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the role for which the transcript is for. - */ -export type ClientMessageTranscriptRole = "assistant" | "user"; +/** This is the role for which the transcript is for. */ export const ClientMessageTranscriptRole = { Assistant: "assistant", User: "user", } as const; +export type ClientMessageTranscriptRole = + (typeof ClientMessageTranscriptRole)[keyof typeof ClientMessageTranscriptRole]; diff --git a/src/api/types/ClientMessageTranscriptTranscriptType.ts b/src/api/types/ClientMessageTranscriptTranscriptType.ts index b9254e5f..8b01d49f 100644 --- a/src/api/types/ClientMessageTranscriptTranscriptType.ts +++ b/src/api/types/ClientMessageTranscriptTranscriptType.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the type of the transcript. - */ -export type ClientMessageTranscriptTranscriptType = "partial" | "final"; +/** This is the type of the transcript. */ export const ClientMessageTranscriptTranscriptType = { Partial: "partial", Final: "final", } as const; +export type ClientMessageTranscriptTranscriptType = + (typeof ClientMessageTranscriptTranscriptType)[keyof typeof ClientMessageTranscriptTranscriptType]; diff --git a/src/api/types/ClientMessageTranscriptType.ts b/src/api/types/ClientMessageTranscriptType.ts index 8ce0d79a..81489997 100644 --- a/src/api/types/ClientMessageTranscriptType.ts +++ b/src/api/types/ClientMessageTranscriptType.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the type of the message. "transcript" is sent as transcriber outputs partial or final transcript. - */ -export type ClientMessageTranscriptType = "transcript" | 'transcript[transcriptType="final"]'; +/** This is the type of the message. "transcript" is sent as transcriber outputs partial or final transcript. */ export const ClientMessageTranscriptType = { Transcript: "transcript", TranscriptTranscriptTypeFinal: 'transcript[transcriptType="final"]', } as const; +export type ClientMessageTranscriptType = + (typeof ClientMessageTranscriptType)[keyof typeof ClientMessageTranscriptType]; diff --git a/src/api/types/ClientMessageTransferUpdate.ts b/src/api/types/ClientMessageTransferUpdate.ts index c3ca42dd..6a32e82a 100644 --- a/src/api/types/ClientMessageTransferUpdate.ts +++ b/src/api/types/ClientMessageTransferUpdate.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageTransferUpdate { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageTransferUpdatePhoneNumber; /** This is the type of the message. "transfer-update" is sent whenever a transfer happens. */ - type: "transfer-update"; + type: Vapi.ClientMessageTransferUpdateType; /** This is the destination of the transfer. */ destination?: Vapi.ClientMessageTransferUpdateDestination; /** This is the timestamp of the message. */ diff --git a/src/api/types/ClientMessageTransferUpdateDestination.ts b/src/api/types/ClientMessageTransferUpdateDestination.ts index dcb892e9..e4bdbfea 100644 --- a/src/api/types/ClientMessageTransferUpdateDestination.ts +++ b/src/api/types/ClientMessageTransferUpdateDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination of the transfer. diff --git a/src/api/types/ClientMessageTransferUpdatePhoneNumber.ts b/src/api/types/ClientMessageTransferUpdatePhoneNumber.ts index 6884b8bf..bb4e2d10 100644 --- a/src/api/types/ClientMessageTransferUpdatePhoneNumber.ts +++ b/src/api/types/ClientMessageTransferUpdatePhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageTransferUpdateType.ts b/src/api/types/ClientMessageTransferUpdateType.ts new file mode 100644 index 00000000..3fdcf56b --- /dev/null +++ b/src/api/types/ClientMessageTransferUpdateType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "transfer-update" is sent whenever a transfer happens. */ +export const ClientMessageTransferUpdateType = { + TransferUpdate: "transfer-update", +} as const; +export type ClientMessageTransferUpdateType = + (typeof ClientMessageTransferUpdateType)[keyof typeof ClientMessageTransferUpdateType]; diff --git a/src/api/types/ClientMessageUserInterrupted.ts b/src/api/types/ClientMessageUserInterrupted.ts index cb4f5676..07b4ad62 100644 --- a/src/api/types/ClientMessageUserInterrupted.ts +++ b/src/api/types/ClientMessageUserInterrupted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageUserInterrupted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageUserInterruptedPhoneNumber; /** This is the type of the message. "user-interrupted" is sent when the user interrupts the assistant. */ - type: "user-interrupted"; + type: Vapi.ClientMessageUserInterruptedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageUserInterruptedPhoneNumber.ts b/src/api/types/ClientMessageUserInterruptedPhoneNumber.ts index 1172bcf0..58000227 100644 --- a/src/api/types/ClientMessageUserInterruptedPhoneNumber.ts +++ b/src/api/types/ClientMessageUserInterruptedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageUserInterruptedType.ts b/src/api/types/ClientMessageUserInterruptedType.ts new file mode 100644 index 00000000..337bbe6f --- /dev/null +++ b/src/api/types/ClientMessageUserInterruptedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "user-interrupted" is sent when the user interrupts the assistant. */ +export const ClientMessageUserInterruptedType = { + UserInterrupted: "user-interrupted", +} as const; +export type ClientMessageUserInterruptedType = + (typeof ClientMessageUserInterruptedType)[keyof typeof ClientMessageUserInterruptedType]; diff --git a/src/api/types/ClientMessageVoiceInput.ts b/src/api/types/ClientMessageVoiceInput.ts index afb4a20d..e9d59eac 100644 --- a/src/api/types/ClientMessageVoiceInput.ts +++ b/src/api/types/ClientMessageVoiceInput.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageVoiceInput { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageVoiceInputPhoneNumber; /** This is the type of the message. "voice-input" is sent when a generation is requested from voice provider. */ - type: "voice-input"; + type: Vapi.ClientMessageVoiceInputType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageVoiceInputPhoneNumber.ts b/src/api/types/ClientMessageVoiceInputPhoneNumber.ts index d52abaab..f846855c 100644 --- a/src/api/types/ClientMessageVoiceInputPhoneNumber.ts +++ b/src/api/types/ClientMessageVoiceInputPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageVoiceInputType.ts b/src/api/types/ClientMessageVoiceInputType.ts new file mode 100644 index 00000000..9c88e642 --- /dev/null +++ b/src/api/types/ClientMessageVoiceInputType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "voice-input" is sent when a generation is requested from voice provider. */ +export const ClientMessageVoiceInputType = { + VoiceInput: "voice-input", +} as const; +export type ClientMessageVoiceInputType = + (typeof ClientMessageVoiceInputType)[keyof typeof ClientMessageVoiceInputType]; diff --git a/src/api/types/ClientMessageWorkflowNodeStarted.ts b/src/api/types/ClientMessageWorkflowNodeStarted.ts index d89c5ed4..da33d28c 100644 --- a/src/api/types/ClientMessageWorkflowNodeStarted.ts +++ b/src/api/types/ClientMessageWorkflowNodeStarted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ClientMessageWorkflowNodeStarted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ClientMessageWorkflowNodeStartedPhoneNumber; /** This is the type of the message. "workflow.node.started" is sent when the active node changes. */ - type: "workflow.node.started"; + type: Vapi.ClientMessageWorkflowNodeStartedType; /** This is the timestamp of the message. */ timestamp?: number; /** This is the call that the message is associated with. */ diff --git a/src/api/types/ClientMessageWorkflowNodeStartedPhoneNumber.ts b/src/api/types/ClientMessageWorkflowNodeStartedPhoneNumber.ts index efac414e..28300a70 100644 --- a/src/api/types/ClientMessageWorkflowNodeStartedPhoneNumber.ts +++ b/src/api/types/ClientMessageWorkflowNodeStartedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ClientMessageWorkflowNodeStartedType.ts b/src/api/types/ClientMessageWorkflowNodeStartedType.ts new file mode 100644 index 00000000..39f22261 --- /dev/null +++ b/src/api/types/ClientMessageWorkflowNodeStartedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "workflow.node.started" is sent when the active node changes. */ +export const ClientMessageWorkflowNodeStartedType = { + WorkflowNodeStarted: "workflow.node.started", +} as const; +export type ClientMessageWorkflowNodeStartedType = + (typeof ClientMessageWorkflowNodeStartedType)[keyof typeof ClientMessageWorkflowNodeStartedType]; diff --git a/src/api/types/CloneVoiceDto.ts b/src/api/types/CloneVoiceDto.ts index 3d502081..aca4b5b9 100644 --- a/src/api/types/CloneVoiceDto.ts +++ b/src/api/types/CloneVoiceDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CloneVoiceDto { /** This is the name of the cloned voice in the provider account. */ diff --git a/src/api/types/CloudflareCredential.ts b/src/api/types/CloudflareCredential.ts index d57c7619..61e60d7e 100644 --- a/src/api/types/CloudflareCredential.ts +++ b/src/api/types/CloudflareCredential.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CloudflareCredential { /** Credential provider. Only allowed value is cloudflare */ - provider: "cloudflare"; + provider: Vapi.CloudflareCredentialProvider; /** Cloudflare Account Id. */ accountId?: string; /** Cloudflare API Key / Token. */ diff --git a/src/api/types/CloudflareCredentialProvider.ts b/src/api/types/CloudflareCredentialProvider.ts new file mode 100644 index 00000000..2d30650f --- /dev/null +++ b/src/api/types/CloudflareCredentialProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Credential provider. Only allowed value is cloudflare */ +export const CloudflareCredentialProvider = { + Cloudflare: "cloudflare", +} as const; +export type CloudflareCredentialProvider = + (typeof CloudflareCredentialProvider)[keyof typeof CloudflareCredentialProvider]; diff --git a/src/api/types/CloudflareR2BucketPlan.ts b/src/api/types/CloudflareR2BucketPlan.ts index 7491eb63..44d6d61d 100644 --- a/src/api/types/CloudflareR2BucketPlan.ts +++ b/src/api/types/CloudflareR2BucketPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CloudflareR2BucketPlan { /** Cloudflare R2 Access key ID. */ diff --git a/src/api/types/Compliance.ts b/src/api/types/Compliance.ts index 859462a6..013cd1e9 100644 --- a/src/api/types/Compliance.ts +++ b/src/api/types/Compliance.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Compliance { /** This is the recording consent of the call. Configure in `assistant.compliancePlan.recordingConsentPlan`. */ diff --git a/src/api/types/ComplianceOverride.ts b/src/api/types/ComplianceOverride.ts new file mode 100644 index 00000000..cc03afd5 --- /dev/null +++ b/src/api/types/ComplianceOverride.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface ComplianceOverride { + /** Force storage for this output under HIPAA. Only enable if output contains no sensitive data. */ + forceStoreOnHipaaEnabled?: boolean; +} diff --git a/src/api/types/CompliancePlan.ts b/src/api/types/CompliancePlan.ts index 2782b6e5..d129fd02 100644 --- a/src/api/types/CompliancePlan.ts +++ b/src/api/types/CompliancePlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CompliancePlan { /** diff --git a/src/api/types/CompliancePlanRecordingConsentPlan.ts b/src/api/types/CompliancePlanRecordingConsentPlan.ts index 7b1fc5d6..df1046bd 100644 --- a/src/api/types/CompliancePlanRecordingConsentPlan.ts +++ b/src/api/types/CompliancePlanRecordingConsentPlan.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CompliancePlanRecordingConsentPlan = Vapi.RecordingConsentPlanStayOnLine | Vapi.RecordingConsentPlanVerbal; diff --git a/src/api/types/ComputerTool.ts b/src/api/types/ComputerTool.ts index e0470d59..d5fc4e61 100644 --- a/src/api/types/ComputerTool.ts +++ b/src/api/types/ComputerTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ComputerTool { /** @@ -13,7 +11,7 @@ export interface ComputerTool { messages?: Vapi.ComputerToolMessagesItem[]; type: "computer"; /** The sub type of tool. */ - subType: "computer_20241022"; + subType: Vapi.ComputerToolSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -115,7 +113,7 @@ export interface ComputerTool { */ rejectionPlan?: Vapi.ToolRejectionPlan; /** The name of the tool, fixed to 'computer' */ - name: "computer"; + name: Vapi.ComputerToolName; /** The display width in pixels */ displayWidthPx: number; /** The display height in pixels */ diff --git a/src/api/types/ComputerToolMessagesItem.ts b/src/api/types/ComputerToolMessagesItem.ts index 0f646b5c..e1367025 100644 --- a/src/api/types/ComputerToolMessagesItem.ts +++ b/src/api/types/ComputerToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ComputerToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/ComputerToolName.ts b/src/api/types/ComputerToolName.ts new file mode 100644 index 00000000..31a2796c --- /dev/null +++ b/src/api/types/ComputerToolName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'computer' */ +export const ComputerToolName = { + Computer: "computer", +} as const; +export type ComputerToolName = (typeof ComputerToolName)[keyof typeof ComputerToolName]; diff --git a/src/api/types/ComputerToolSubType.ts b/src/api/types/ComputerToolSubType.ts new file mode 100644 index 00000000..57167be5 --- /dev/null +++ b/src/api/types/ComputerToolSubType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const ComputerToolSubType = { + Computer20241022: "computer_20241022", +} as const; +export type ComputerToolSubType = (typeof ComputerToolSubType)[keyof typeof ComputerToolSubType]; diff --git a/src/api/types/ComputerToolWithToolCall.ts b/src/api/types/ComputerToolWithToolCall.ts index 1f90fdb5..a008c625 100644 --- a/src/api/types/ComputerToolWithToolCall.ts +++ b/src/api/types/ComputerToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ComputerToolWithToolCall { /** @@ -12,9 +10,9 @@ export interface ComputerToolWithToolCall { */ messages?: Vapi.ComputerToolWithToolCallMessagesItem[]; /** The type of tool. "computer" for Computer tool. */ - type: "computer"; + type: Vapi.ComputerToolWithToolCallType; /** The sub type of tool. */ - subType: "computer_20241022"; + subType: Vapi.ComputerToolWithToolCallSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -28,7 +26,7 @@ export interface ComputerToolWithToolCall { server?: Vapi.Server; toolCall: Vapi.ToolCall; /** The name of the tool, fixed to 'computer' */ - name: "computer"; + name: Vapi.ComputerToolWithToolCallName; /** The display width in pixels */ displayWidthPx: number; /** The display height in pixels */ diff --git a/src/api/types/ComputerToolWithToolCallMessagesItem.ts b/src/api/types/ComputerToolWithToolCallMessagesItem.ts index f490a9da..165a12e0 100644 --- a/src/api/types/ComputerToolWithToolCallMessagesItem.ts +++ b/src/api/types/ComputerToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ComputerToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/ComputerToolWithToolCallName.ts b/src/api/types/ComputerToolWithToolCallName.ts new file mode 100644 index 00000000..47920ef2 --- /dev/null +++ b/src/api/types/ComputerToolWithToolCallName.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'computer' */ +export const ComputerToolWithToolCallName = { + Computer: "computer", +} as const; +export type ComputerToolWithToolCallName = + (typeof ComputerToolWithToolCallName)[keyof typeof ComputerToolWithToolCallName]; diff --git a/src/api/types/ComputerToolWithToolCallSubType.ts b/src/api/types/ComputerToolWithToolCallSubType.ts new file mode 100644 index 00000000..1283ce1f --- /dev/null +++ b/src/api/types/ComputerToolWithToolCallSubType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const ComputerToolWithToolCallSubType = { + Computer20241022: "computer_20241022", +} as const; +export type ComputerToolWithToolCallSubType = + (typeof ComputerToolWithToolCallSubType)[keyof typeof ComputerToolWithToolCallSubType]; diff --git a/src/api/types/ComputerToolWithToolCallType.ts b/src/api/types/ComputerToolWithToolCallType.ts new file mode 100644 index 00000000..4f4c4afb --- /dev/null +++ b/src/api/types/ComputerToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "computer" for Computer tool. */ +export const ComputerToolWithToolCallType = { + Computer: "computer", +} as const; +export type ComputerToolWithToolCallType = + (typeof ComputerToolWithToolCallType)[keyof typeof ComputerToolWithToolCallType]; diff --git a/src/api/types/Condition.ts b/src/api/types/Condition.ts index f177294b..66d1d180 100644 --- a/src/api/types/Condition.ts +++ b/src/api/types/Condition.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Condition { /** This is the operator you want to use to compare the parameter and value. */ diff --git a/src/api/types/ConditionOperator.ts b/src/api/types/ConditionOperator.ts index 2083062a..e590557c 100644 --- a/src/api/types/ConditionOperator.ts +++ b/src/api/types/ConditionOperator.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the operator you want to use to compare the parameter and value. - */ -export type ConditionOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte"; +/** This is the operator you want to use to compare the parameter and value. */ export const ConditionOperator = { Eq: "eq", Neq: "neq", @@ -14,3 +9,4 @@ export const ConditionOperator = { Lt: "lt", Lte: "lte", } as const; +export type ConditionOperator = (typeof ConditionOperator)[keyof typeof ConditionOperator]; diff --git a/src/api/types/ContextEngineeringPlanAll.ts b/src/api/types/ContextEngineeringPlanAll.ts index 3b63b54b..c3dd6606 100644 --- a/src/api/types/ContextEngineeringPlanAll.ts +++ b/src/api/types/ContextEngineeringPlanAll.ts @@ -1,7 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ContextEngineeringPlanAll { - type: "all"; + type: Vapi.ContextEngineeringPlanAllType; } diff --git a/src/api/types/ContextEngineeringPlanAllType.ts b/src/api/types/ContextEngineeringPlanAllType.ts new file mode 100644 index 00000000..e454d0ef --- /dev/null +++ b/src/api/types/ContextEngineeringPlanAllType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ContextEngineeringPlanAllType = { + All: "all", +} as const; +export type ContextEngineeringPlanAllType = + (typeof ContextEngineeringPlanAllType)[keyof typeof ContextEngineeringPlanAllType]; diff --git a/src/api/types/ContextEngineeringPlanLastNMessages.ts b/src/api/types/ContextEngineeringPlanLastNMessages.ts index 419e3b47..c85848d0 100644 --- a/src/api/types/ContextEngineeringPlanLastNMessages.ts +++ b/src/api/types/ContextEngineeringPlanLastNMessages.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ContextEngineeringPlanLastNMessages { - type: "lastNMessages"; + type: Vapi.ContextEngineeringPlanLastNMessagesType; /** This is the maximum number of messages to include in the context engineering plan. */ maxMessages: number; } diff --git a/src/api/types/ContextEngineeringPlanLastNMessagesType.ts b/src/api/types/ContextEngineeringPlanLastNMessagesType.ts new file mode 100644 index 00000000..794290e5 --- /dev/null +++ b/src/api/types/ContextEngineeringPlanLastNMessagesType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ContextEngineeringPlanLastNMessagesType = { + LastNMessages: "lastNMessages", +} as const; +export type ContextEngineeringPlanLastNMessagesType = + (typeof ContextEngineeringPlanLastNMessagesType)[keyof typeof ContextEngineeringPlanLastNMessagesType]; diff --git a/src/api/types/ContextEngineeringPlanNone.ts b/src/api/types/ContextEngineeringPlanNone.ts index 8d98c812..e17895a0 100644 --- a/src/api/types/ContextEngineeringPlanNone.ts +++ b/src/api/types/ContextEngineeringPlanNone.ts @@ -1,7 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ContextEngineeringPlanNone { - type: "none"; + type: Vapi.ContextEngineeringPlanNoneType; } diff --git a/src/api/types/ContextEngineeringPlanNoneType.ts b/src/api/types/ContextEngineeringPlanNoneType.ts new file mode 100644 index 00000000..4928f02e --- /dev/null +++ b/src/api/types/ContextEngineeringPlanNoneType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ContextEngineeringPlanNoneType = { + None: "none", +} as const; +export type ContextEngineeringPlanNoneType = + (typeof ContextEngineeringPlanNoneType)[keyof typeof ContextEngineeringPlanNoneType]; diff --git a/src/api/types/ConversationNode.ts b/src/api/types/ConversationNode.ts index 09537138..9c0e03e0 100644 --- a/src/api/types/ConversationNode.ts +++ b/src/api/types/ConversationNode.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ConversationNode { /** @@ -15,7 +13,7 @@ export interface ConversationNode { * - Workflow will extract variables from the conversation. * - Workflow continues. */ - type: "conversation"; + type: Vapi.ConversationNodeType; /** * This is the model for the node. * diff --git a/src/api/types/ConversationNodeModel.ts b/src/api/types/ConversationNodeModel.ts index 334be0db..e9b0885f 100644 --- a/src/api/types/ConversationNodeModel.ts +++ b/src/api/types/ConversationNodeModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the model for the node. diff --git a/src/api/types/ConversationNodeToolsItem.ts b/src/api/types/ConversationNodeToolsItem.ts index ddd92eb0..b6a2f218 100644 --- a/src/api/types/ConversationNodeToolsItem.ts +++ b/src/api/types/ConversationNodeToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ConversationNodeToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/ConversationNodeTranscriber.ts b/src/api/types/ConversationNodeTranscriber.ts index 456ce512..b5dad131 100644 --- a/src/api/types/ConversationNodeTranscriber.ts +++ b/src/api/types/ConversationNodeTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the transcriber for the node. diff --git a/src/api/types/ConversationNodeType.ts b/src/api/types/ConversationNodeType.ts new file mode 100644 index 00000000..5b301d53 --- /dev/null +++ b/src/api/types/ConversationNodeType.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the Conversation node. This can be used to start a conversation with the customer. + * + * The flow is: + * - Workflow starts the conversation node + * - Model is active with the `prompt` and global context. + * - Model will call a tool to exit this node. + * - Workflow will extract variables from the conversation. + * - Workflow continues. + */ +export const ConversationNodeType = { + Conversation: "conversation", +} as const; +export type ConversationNodeType = (typeof ConversationNodeType)[keyof typeof ConversationNodeType]; diff --git a/src/api/types/ConversationNodeVoice.ts b/src/api/types/ConversationNodeVoice.ts index 5a1ef0bb..09e457cc 100644 --- a/src/api/types/ConversationNodeVoice.ts +++ b/src/api/types/ConversationNodeVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voice for the node. diff --git a/src/api/types/CostBreakdown.ts b/src/api/types/CostBreakdown.ts index 8d803569..821d5e85 100644 --- a/src/api/types/CostBreakdown.ts +++ b/src/api/types/CostBreakdown.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CostBreakdown { /** This is the cost of the transport provider, like Twilio or Vonage. */ diff --git a/src/api/types/CreateAnthropicCredentialDto.ts b/src/api/types/CreateAnthropicCredentialDto.ts index 5320356b..c7bbba5b 100644 --- a/src/api/types/CreateAnthropicCredentialDto.ts +++ b/src/api/types/CreateAnthropicCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateAnthropicCredentialDto { provider: "anthropic"; diff --git a/src/api/types/CreateAnyscaleCredentialDto.ts b/src/api/types/CreateAnyscaleCredentialDto.ts index 8f241d9a..2d650b44 100644 --- a/src/api/types/CreateAnyscaleCredentialDto.ts +++ b/src/api/types/CreateAnyscaleCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateAnyscaleCredentialDto { provider: "anyscale"; diff --git a/src/api/types/CreateApiRequestToolDto.ts b/src/api/types/CreateApiRequestToolDto.ts index dd96e49f..93a33fb3 100644 --- a/src/api/types/CreateApiRequestToolDto.ts +++ b/src/api/types/CreateApiRequestToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateApiRequestToolDto { /** diff --git a/src/api/types/CreateApiRequestToolDtoMessagesItem.ts b/src/api/types/CreateApiRequestToolDtoMessagesItem.ts index 607dd2df..c1b27570 100644 --- a/src/api/types/CreateApiRequestToolDtoMessagesItem.ts +++ b/src/api/types/CreateApiRequestToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateApiRequestToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateApiRequestToolDtoMethod.ts b/src/api/types/CreateApiRequestToolDtoMethod.ts index 5d52d585..f9a682c5 100644 --- a/src/api/types/CreateApiRequestToolDtoMethod.ts +++ b/src/api/types/CreateApiRequestToolDtoMethod.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateApiRequestToolDtoMethod = "POST" | "GET" | "PUT" | "PATCH" | "DELETE"; export const CreateApiRequestToolDtoMethod = { Post: "POST", Get: "GET", @@ -10,3 +7,5 @@ export const CreateApiRequestToolDtoMethod = { Patch: "PATCH", Delete: "DELETE", } as const; +export type CreateApiRequestToolDtoMethod = + (typeof CreateApiRequestToolDtoMethod)[keyof typeof CreateApiRequestToolDtoMethod]; diff --git a/src/api/types/CreateAssemblyAiCredentialDto.ts b/src/api/types/CreateAssemblyAiCredentialDto.ts index f4e12cf2..103e46ea 100644 --- a/src/api/types/CreateAssemblyAiCredentialDto.ts +++ b/src/api/types/CreateAssemblyAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateAssemblyAiCredentialDto { provider: "assembly-ai"; diff --git a/src/api/types/CreateAssistantDto.ts b/src/api/types/CreateAssistantDto.ts index 291dc672..f85ec96b 100644 --- a/src/api/types/CreateAssistantDto.ts +++ b/src/api/types/CreateAssistantDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateAssistantDto { /** These are the options for the assistant's transcriber. */ @@ -31,13 +29,12 @@ export interface CreateAssistantDto { firstMessageMode?: Vapi.CreateAssistantDtoFirstMessageMode; /** * 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. + * By default, voicemail detection is disabled. */ voicemailDetection?: Vapi.CreateAssistantDtoVoicemailDetection; - /** 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. 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. */ clientMessages?: Vapi.CreateAssistantDtoClientMessagesItem[]; - /** 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. You can check the shape of the messages in ServerMessage schema. */ + /** 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. */ serverMessages?: Vapi.CreateAssistantDtoServerMessagesItem[]; /** * This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended. diff --git a/src/api/types/CreateAssistantDtoBackgroundSound.ts b/src/api/types/CreateAssistantDtoBackgroundSound.ts index 58e0c8b7..2aaf3e50 100644 --- a/src/api/types/CreateAssistantDtoBackgroundSound.ts +++ b/src/api/types/CreateAssistantDtoBackgroundSound.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. diff --git a/src/api/types/CreateAssistantDtoBackgroundSoundZero.ts b/src/api/types/CreateAssistantDtoBackgroundSoundZero.ts index 4c1328c7..cb0c5e1c 100644 --- a/src/api/types/CreateAssistantDtoBackgroundSoundZero.ts +++ b/src/api/types/CreateAssistantDtoBackgroundSoundZero.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateAssistantDtoBackgroundSoundZero = "off" | "office"; export const CreateAssistantDtoBackgroundSoundZero = { Off: "off", Office: "office", } as const; +export type CreateAssistantDtoBackgroundSoundZero = + (typeof CreateAssistantDtoBackgroundSoundZero)[keyof typeof CreateAssistantDtoBackgroundSoundZero]; diff --git a/src/api/types/CreateAssistantDtoClientMessagesItem.ts b/src/api/types/CreateAssistantDtoClientMessagesItem.ts index a51fd10a..97b935f5 100644 --- a/src/api/types/CreateAssistantDtoClientMessagesItem.ts +++ b/src/api/types/CreateAssistantDtoClientMessagesItem.ts @@ -1,25 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateAssistantDtoClientMessagesItem = - | "conversation-update" - | "function-call" - | "function-call-result" - | "hang" - | "language-changed" - | "metadata" - | "model-output" - | "speech-update" - | "status-update" - | "transcript" - | "tool-calls" - | "tool-calls-result" - | "tool.completed" - | "transfer-update" - | "user-interrupted" - | "voice-input" - | "workflow.node.started"; export const CreateAssistantDtoClientMessagesItem = { ConversationUpdate: "conversation-update", FunctionCall: "function-call", @@ -38,4 +18,7 @@ export const CreateAssistantDtoClientMessagesItem = { UserInterrupted: "user-interrupted", VoiceInput: "voice-input", WorkflowNodeStarted: "workflow.node.started", + AssistantStarted: "assistant.started", } as const; +export type CreateAssistantDtoClientMessagesItem = + (typeof CreateAssistantDtoClientMessagesItem)[keyof typeof CreateAssistantDtoClientMessagesItem]; diff --git a/src/api/types/CreateAssistantDtoCredentialsItem.ts b/src/api/types/CreateAssistantDtoCredentialsItem.ts index 2bebfd05..5ea5ff90 100644 --- a/src/api/types/CreateAssistantDtoCredentialsItem.ts +++ b/src/api/types/CreateAssistantDtoCredentialsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateAssistantDtoCredentialsItem = | Vapi.CreateElevenLabsCredentialDto diff --git a/src/api/types/CreateAssistantDtoFirstMessageMode.ts b/src/api/types/CreateAssistantDtoFirstMessageMode.ts index d1d30460..df6ce425 100644 --- a/src/api/types/CreateAssistantDtoFirstMessageMode.ts +++ b/src/api/types/CreateAssistantDtoFirstMessageMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the mode for the first message. Default is 'assistant-speaks-first'. @@ -12,12 +10,10 @@ * * @default 'assistant-speaks-first' */ -export type CreateAssistantDtoFirstMessageMode = - | "assistant-speaks-first" - | "assistant-speaks-first-with-model-generated-message" - | "assistant-waits-for-user"; export const CreateAssistantDtoFirstMessageMode = { AssistantSpeaksFirst: "assistant-speaks-first", AssistantSpeaksFirstWithModelGeneratedMessage: "assistant-speaks-first-with-model-generated-message", AssistantWaitsForUser: "assistant-waits-for-user", } as const; +export type CreateAssistantDtoFirstMessageMode = + (typeof CreateAssistantDtoFirstMessageMode)[keyof typeof CreateAssistantDtoFirstMessageMode]; diff --git a/src/api/types/CreateAssistantDtoHooksItem.ts b/src/api/types/CreateAssistantDtoHooksItem.ts index ce2e65da..a471b76c 100644 --- a/src/api/types/CreateAssistantDtoHooksItem.ts +++ b/src/api/types/CreateAssistantDtoHooksItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateAssistantDtoHooksItem = | Vapi.CallHookCallEnding diff --git a/src/api/types/CreateAssistantDtoModel.ts b/src/api/types/CreateAssistantDtoModel.ts index cbbc6fa6..27afdd17 100644 --- a/src/api/types/CreateAssistantDtoModel.ts +++ b/src/api/types/CreateAssistantDtoModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's LLM. diff --git a/src/api/types/CreateAssistantDtoServerMessagesItem.ts b/src/api/types/CreateAssistantDtoServerMessagesItem.ts index 73134a3a..c9fd033b 100644 --- a/src/api/types/CreateAssistantDtoServerMessagesItem.ts +++ b/src/api/types/CreateAssistantDtoServerMessagesItem.ts @@ -1,34 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateAssistantDtoServerMessagesItem = - | "conversation-update" - | "end-of-call-report" - | "function-call" - | "hang" - | "language-changed" - | "language-change-detected" - | "model-output" - | "phone-call-control" - | "speech-update" - | "status-update" - | "transcript" - | 'transcript[transcriptType="final"]' - | "tool-calls" - | "transfer-destination-request" - | "handoff-destination-request" - | "transfer-update" - | "user-interrupted" - | "voice-input" - | "chat.created" - | "chat.deleted" - | "session.created" - | "session.updated" - | "session.deleted" - | "call.deleted" - | "call.delete.failed"; export const CreateAssistantDtoServerMessagesItem = { + AssistantStarted: "assistant.started", ConversationUpdate: "conversation-update", EndOfCallReport: "end-of-call-report", FunctionCall: "function-call", @@ -55,3 +28,5 @@ export const CreateAssistantDtoServerMessagesItem = { CallDeleted: "call.deleted", CallDeleteFailed: "call.delete.failed", } as const; +export type CreateAssistantDtoServerMessagesItem = + (typeof CreateAssistantDtoServerMessagesItem)[keyof typeof CreateAssistantDtoServerMessagesItem]; diff --git a/src/api/types/CreateAssistantDtoTranscriber.ts b/src/api/types/CreateAssistantDtoTranscriber.ts index ac0cb430..7c0d4fbf 100644 --- a/src/api/types/CreateAssistantDtoTranscriber.ts +++ b/src/api/types/CreateAssistantDtoTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's transcriber. diff --git a/src/api/types/CreateAssistantDtoVoice.ts b/src/api/types/CreateAssistantDtoVoice.ts index 50cf7943..2774b224 100644 --- a/src/api/types/CreateAssistantDtoVoice.ts +++ b/src/api/types/CreateAssistantDtoVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * These are the options for the assistant's voice. diff --git a/src/api/types/CreateAssistantDtoVoicemailDetection.ts b/src/api/types/CreateAssistantDtoVoicemailDetection.ts index 15a35004..3945334f 100644 --- a/src/api/types/CreateAssistantDtoVoicemailDetection.ts +++ b/src/api/types/CreateAssistantDtoVoicemailDetection.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * 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. + * By default, voicemail detection is disabled. */ export type CreateAssistantDtoVoicemailDetection = + | Vapi.CreateAssistantDtoVoicemailDetectionZero | Vapi.GoogleVoicemailDetectionPlan | Vapi.OpenAiVoicemailDetectionPlan | Vapi.TwilioVoicemailDetectionPlan diff --git a/src/api/types/CreateAssistantDtoVoicemailDetectionZero.ts b/src/api/types/CreateAssistantDtoVoicemailDetectionZero.ts new file mode 100644 index 00000000..33fa32f9 --- /dev/null +++ b/src/api/types/CreateAssistantDtoVoicemailDetectionZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CreateAssistantDtoVoicemailDetectionZero = { + Off: "off", +} as const; +export type CreateAssistantDtoVoicemailDetectionZero = + (typeof CreateAssistantDtoVoicemailDetectionZero)[keyof typeof CreateAssistantDtoVoicemailDetectionZero]; diff --git a/src/api/types/CreateAzureCredentialDto.ts b/src/api/types/CreateAzureCredentialDto.ts index d93b3a07..c082cdcb 100644 --- a/src/api/types/CreateAzureCredentialDto.ts +++ b/src/api/types/CreateAzureCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateAzureCredentialDto { provider: "azure"; diff --git a/src/api/types/CreateAzureCredentialDtoRegion.ts b/src/api/types/CreateAzureCredentialDtoRegion.ts index 62204a0e..4a2d575c 100644 --- a/src/api/types/CreateAzureCredentialDtoRegion.ts +++ b/src/api/types/CreateAzureCredentialDtoRegion.ts @@ -1,29 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the region of the Azure resource. - */ -export type CreateAzureCredentialDtoRegion = - | "australia" - | "canadaeast" - | "canadacentral" - | "eastus2" - | "eastus" - | "france" - | "india" - | "japaneast" - | "japanwest" - | "uaenorth" - | "northcentralus" - | "norway" - | "southcentralus" - | "swedencentral" - | "switzerland" - | "uk" - | "westus" - | "westus3"; +/** This is the region of the Azure resource. */ export const CreateAzureCredentialDtoRegion = { Australia: "australia", Canadaeast: "canadaeast", @@ -44,3 +21,5 @@ export const CreateAzureCredentialDtoRegion = { Westus: "westus", Westus3: "westus3", } as const; +export type CreateAzureCredentialDtoRegion = + (typeof CreateAzureCredentialDtoRegion)[keyof typeof CreateAzureCredentialDtoRegion]; diff --git a/src/api/types/CreateAzureCredentialDtoService.ts b/src/api/types/CreateAzureCredentialDtoService.ts index d2e93fa9..42b72f8c 100644 --- a/src/api/types/CreateAzureCredentialDtoService.ts +++ b/src/api/types/CreateAzureCredentialDtoService.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the service being used in Azure. - */ -export type CreateAzureCredentialDtoService = "speech" | "blob_storage"; +/** This is the service being used in Azure. */ export const CreateAzureCredentialDtoService = { Speech: "speech", BlobStorage: "blob_storage", } as const; +export type CreateAzureCredentialDtoService = + (typeof CreateAzureCredentialDtoService)[keyof typeof CreateAzureCredentialDtoService]; diff --git a/src/api/types/CreateAzureOpenAiCredentialDto.ts b/src/api/types/CreateAzureOpenAiCredentialDto.ts index 658658bf..4e02f05c 100644 --- a/src/api/types/CreateAzureOpenAiCredentialDto.ts +++ b/src/api/types/CreateAzureOpenAiCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateAzureOpenAiCredentialDto { provider: "azure-openai"; diff --git a/src/api/types/CreateAzureOpenAiCredentialDtoModelsItem.ts b/src/api/types/CreateAzureOpenAiCredentialDtoModelsItem.ts index 7e9a4389..ad593a25 100644 --- a/src/api/types/CreateAzureOpenAiCredentialDtoModelsItem.ts +++ b/src/api/types/CreateAzureOpenAiCredentialDtoModelsItem.ts @@ -1,24 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateAzureOpenAiCredentialDtoModelsItem = - | "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" - | "gpt-4-0613" - | "gpt-35-turbo-0125" - | "gpt-35-turbo-1106"; export const CreateAzureOpenAiCredentialDtoModelsItem = { Gpt5: "gpt-5", Gpt5Mini: "gpt-5-mini", @@ -37,3 +18,5 @@ export const CreateAzureOpenAiCredentialDtoModelsItem = { Gpt35Turbo0125: "gpt-35-turbo-0125", Gpt35Turbo1106: "gpt-35-turbo-1106", } as const; +export type CreateAzureOpenAiCredentialDtoModelsItem = + (typeof CreateAzureOpenAiCredentialDtoModelsItem)[keyof typeof CreateAzureOpenAiCredentialDtoModelsItem]; diff --git a/src/api/types/CreateAzureOpenAiCredentialDtoRegion.ts b/src/api/types/CreateAzureOpenAiCredentialDtoRegion.ts index b6b2980e..65b4e968 100644 --- a/src/api/types/CreateAzureOpenAiCredentialDtoRegion.ts +++ b/src/api/types/CreateAzureOpenAiCredentialDtoRegion.ts @@ -1,26 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateAzureOpenAiCredentialDtoRegion = - | "australia" - | "canadaeast" - | "canadacentral" - | "eastus2" - | "eastus" - | "france" - | "india" - | "japaneast" - | "japanwest" - | "uaenorth" - | "northcentralus" - | "norway" - | "southcentralus" - | "swedencentral" - | "switzerland" - | "uk" - | "westus" - | "westus3"; export const CreateAzureOpenAiCredentialDtoRegion = { Australia: "australia", Canadaeast: "canadaeast", @@ -41,3 +20,5 @@ export const CreateAzureOpenAiCredentialDtoRegion = { Westus: "westus", Westus3: "westus3", } as const; +export type CreateAzureOpenAiCredentialDtoRegion = + (typeof CreateAzureOpenAiCredentialDtoRegion)[keyof typeof CreateAzureOpenAiCredentialDtoRegion]; diff --git a/src/api/types/CreateBarInsightFromCallTableDto.ts b/src/api/types/CreateBarInsightFromCallTableDto.ts new file mode 100644 index 00000000..aa2f9197 --- /dev/null +++ b/src/api/types/CreateBarInsightFromCallTableDto.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface CreateBarInsightFromCallTableDto { + /** This is the name of the Insight. */ + name?: string; + type: "bar"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + /** This is the metadata for the insight. */ + metadata?: Vapi.BarInsightMetadata; + timeRange?: Vapi.InsightTimeRangeWithStep; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.CreateBarInsightFromCallTableDtoGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.CreateBarInsightFromCallTableDtoQueriesItem[]; +} diff --git a/src/api/types/CreateBarInsightFromCallTableDtoGroupBy.ts b/src/api/types/CreateBarInsightFromCallTableDtoGroupBy.ts new file mode 100644 index 00000000..4a05a6cc --- /dev/null +++ b/src/api/types/CreateBarInsightFromCallTableDtoGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const CreateBarInsightFromCallTableDtoGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type CreateBarInsightFromCallTableDtoGroupBy = + (typeof CreateBarInsightFromCallTableDtoGroupBy)[keyof typeof CreateBarInsightFromCallTableDtoGroupBy]; diff --git a/src/api/types/CreateBarInsightFromCallTableDtoQueriesItem.ts b/src/api/types/CreateBarInsightFromCallTableDtoQueriesItem.ts new file mode 100644 index 00000000..645a6461 --- /dev/null +++ b/src/api/types/CreateBarInsightFromCallTableDtoQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type CreateBarInsightFromCallTableDtoQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/CreateBashToolDto.ts b/src/api/types/CreateBashToolDto.ts index dea9d6a6..6dbec748 100644 --- a/src/api/types/CreateBashToolDto.ts +++ b/src/api/types/CreateBashToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateBashToolDto { /** @@ -13,7 +11,7 @@ export interface CreateBashToolDto { messages?: Vapi.CreateBashToolDtoMessagesItem[]; type: "bash"; /** The sub type of tool. */ - subType: "bash_20241022"; + subType: Vapi.CreateBashToolDtoSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -26,7 +24,7 @@ export interface CreateBashToolDto { */ server?: Vapi.Server; /** The name of the tool, fixed to 'bash' */ - name: "bash"; + name: Vapi.CreateBashToolDtoName; /** * This is the plan to reject a tool call based on the conversation state. * diff --git a/src/api/types/CreateBashToolDtoMessagesItem.ts b/src/api/types/CreateBashToolDtoMessagesItem.ts index 52217a08..1f09bdea 100644 --- a/src/api/types/CreateBashToolDtoMessagesItem.ts +++ b/src/api/types/CreateBashToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateBashToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateBashToolDtoName.ts b/src/api/types/CreateBashToolDtoName.ts new file mode 100644 index 00000000..6b744e3c --- /dev/null +++ b/src/api/types/CreateBashToolDtoName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'bash' */ +export const CreateBashToolDtoName = { + Bash: "bash", +} as const; +export type CreateBashToolDtoName = (typeof CreateBashToolDtoName)[keyof typeof CreateBashToolDtoName]; diff --git a/src/api/types/CreateBashToolDtoSubType.ts b/src/api/types/CreateBashToolDtoSubType.ts new file mode 100644 index 00000000..89d01ccb --- /dev/null +++ b/src/api/types/CreateBashToolDtoSubType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const CreateBashToolDtoSubType = { + Bash20241022: "bash_20241022", +} as const; +export type CreateBashToolDtoSubType = (typeof CreateBashToolDtoSubType)[keyof typeof CreateBashToolDtoSubType]; diff --git a/src/api/types/CreateByoPhoneNumberDto.ts b/src/api/types/CreateByoPhoneNumberDto.ts index 1f21b3e1..7c1d190d 100644 --- a/src/api/types/CreateByoPhoneNumberDto.ts +++ b/src/api/types/CreateByoPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateByoPhoneNumberDto { /** diff --git a/src/api/types/CreateByoPhoneNumberDtoFallbackDestination.ts b/src/api/types/CreateByoPhoneNumberDtoFallbackDestination.ts index f0545aa3..0ed7ea86 100644 --- a/src/api/types/CreateByoPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/CreateByoPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/CreateByoPhoneNumberDtoHooksItem.ts b/src/api/types/CreateByoPhoneNumberDtoHooksItem.ts index 166a2dd2..435075fe 100644 --- a/src/api/types/CreateByoPhoneNumberDtoHooksItem.ts +++ b/src/api/types/CreateByoPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateByoPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/CreateByoSipTrunkCredentialDto.ts b/src/api/types/CreateByoSipTrunkCredentialDto.ts index 0345779a..807a7609 100644 --- a/src/api/types/CreateByoSipTrunkCredentialDto.ts +++ b/src/api/types/CreateByoSipTrunkCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateByoSipTrunkCredentialDto { provider: "byo-sip-trunk"; diff --git a/src/api/types/CreateCartesiaCredentialDto.ts b/src/api/types/CreateCartesiaCredentialDto.ts index 19a38192..42765b0e 100644 --- a/src/api/types/CreateCartesiaCredentialDto.ts +++ b/src/api/types/CreateCartesiaCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateCartesiaCredentialDto { provider: "cartesia"; diff --git a/src/api/types/CreateCerebrasCredentialDto.ts b/src/api/types/CreateCerebrasCredentialDto.ts index 9ed1e949..29faff28 100644 --- a/src/api/types/CreateCerebrasCredentialDto.ts +++ b/src/api/types/CreateCerebrasCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateCerebrasCredentialDto { provider: "cerebras"; diff --git a/src/api/types/CreateChatStreamResponse.ts b/src/api/types/CreateChatStreamResponse.ts index c4220e67..e1d11036 100644 --- a/src/api/types/CreateChatStreamResponse.ts +++ b/src/api/types/CreateChatStreamResponse.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateChatStreamResponse { /** This is the unique identifier for the streaming response. */ diff --git a/src/api/types/CreateCloudflareCredentialDto.ts b/src/api/types/CreateCloudflareCredentialDto.ts index 41face18..a129001d 100644 --- a/src/api/types/CreateCloudflareCredentialDto.ts +++ b/src/api/types/CreateCloudflareCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateCloudflareCredentialDto { provider: "cloudflare"; diff --git a/src/api/types/CreateComputerToolDto.ts b/src/api/types/CreateComputerToolDto.ts index 100c7d59..aa834b5f 100644 --- a/src/api/types/CreateComputerToolDto.ts +++ b/src/api/types/CreateComputerToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateComputerToolDto { /** @@ -13,7 +11,7 @@ export interface CreateComputerToolDto { messages?: Vapi.CreateComputerToolDtoMessagesItem[]; type: "computer"; /** The sub type of tool. */ - subType: "computer_20241022"; + subType: Vapi.CreateComputerToolDtoSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -26,7 +24,7 @@ export interface CreateComputerToolDto { */ server?: Vapi.Server; /** The name of the tool, fixed to 'computer' */ - name: "computer"; + name: Vapi.CreateComputerToolDtoName; /** The display width in pixels */ displayWidthPx: number; /** The display height in pixels */ diff --git a/src/api/types/CreateComputerToolDtoMessagesItem.ts b/src/api/types/CreateComputerToolDtoMessagesItem.ts index 4b74950f..bf3c2ade 100644 --- a/src/api/types/CreateComputerToolDtoMessagesItem.ts +++ b/src/api/types/CreateComputerToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateComputerToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateComputerToolDtoName.ts b/src/api/types/CreateComputerToolDtoName.ts new file mode 100644 index 00000000..70d52e84 --- /dev/null +++ b/src/api/types/CreateComputerToolDtoName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'computer' */ +export const CreateComputerToolDtoName = { + Computer: "computer", +} as const; +export type CreateComputerToolDtoName = (typeof CreateComputerToolDtoName)[keyof typeof CreateComputerToolDtoName]; diff --git a/src/api/types/CreateComputerToolDtoSubType.ts b/src/api/types/CreateComputerToolDtoSubType.ts new file mode 100644 index 00000000..e10e3041 --- /dev/null +++ b/src/api/types/CreateComputerToolDtoSubType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const CreateComputerToolDtoSubType = { + Computer20241022: "computer_20241022", +} as const; +export type CreateComputerToolDtoSubType = + (typeof CreateComputerToolDtoSubType)[keyof typeof CreateComputerToolDtoSubType]; diff --git a/src/api/types/CreateCustomCredentialDto.ts b/src/api/types/CreateCustomCredentialDto.ts index 19748ff2..d7395d17 100644 --- a/src/api/types/CreateCustomCredentialDto.ts +++ b/src/api/types/CreateCustomCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateCustomCredentialDto { provider: "custom-credential"; diff --git a/src/api/types/CreateCustomCredentialDtoAuthenticationPlan.ts b/src/api/types/CreateCustomCredentialDtoAuthenticationPlan.ts index 9312d4f5..f8600491 100644 --- a/src/api/types/CreateCustomCredentialDtoAuthenticationPlan.ts +++ b/src/api/types/CreateCustomCredentialDtoAuthenticationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. diff --git a/src/api/types/CreateCustomKnowledgeBaseDto.ts b/src/api/types/CreateCustomKnowledgeBaseDto.ts index d297efb6..e15a604c 100644 --- a/src/api/types/CreateCustomKnowledgeBaseDto.ts +++ b/src/api/types/CreateCustomKnowledgeBaseDto.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateCustomKnowledgeBaseDto { /** This knowledge base is bring your own knowledge base implementation. */ - provider: "custom-knowledge-base"; + provider: Vapi.CreateCustomKnowledgeBaseDtoProvider; /** * This is where the knowledge base request will be sent. * diff --git a/src/api/types/CreateCustomKnowledgeBaseDtoProvider.ts b/src/api/types/CreateCustomKnowledgeBaseDtoProvider.ts new file mode 100644 index 00000000..58744e93 --- /dev/null +++ b/src/api/types/CreateCustomKnowledgeBaseDtoProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This knowledge base is bring your own knowledge base implementation. */ +export const CreateCustomKnowledgeBaseDtoProvider = { + CustomKnowledgeBase: "custom-knowledge-base", +} as const; +export type CreateCustomKnowledgeBaseDtoProvider = + (typeof CreateCustomKnowledgeBaseDtoProvider)[keyof typeof CreateCustomKnowledgeBaseDtoProvider]; diff --git a/src/api/types/CreateCustomLlmCredentialDto.ts b/src/api/types/CreateCustomLlmCredentialDto.ts index 6d89d144..8e27e683 100644 --- a/src/api/types/CreateCustomLlmCredentialDto.ts +++ b/src/api/types/CreateCustomLlmCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateCustomLlmCredentialDto { provider: "custom-llm"; diff --git a/src/api/types/CreateCustomerDto.ts b/src/api/types/CreateCustomerDto.ts index ac1545e9..7695b561 100644 --- a/src/api/types/CreateCustomerDto.ts +++ b/src/api/types/CreateCustomerDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateCustomerDto { /** diff --git a/src/api/types/CreateDeepInfraCredentialDto.ts b/src/api/types/CreateDeepInfraCredentialDto.ts index 1331b160..56e5b3bd 100644 --- a/src/api/types/CreateDeepInfraCredentialDto.ts +++ b/src/api/types/CreateDeepInfraCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateDeepInfraCredentialDto { provider: "deepinfra"; diff --git a/src/api/types/CreateDeepSeekCredentialDto.ts b/src/api/types/CreateDeepSeekCredentialDto.ts index 022e9f0f..3cd97854 100644 --- a/src/api/types/CreateDeepSeekCredentialDto.ts +++ b/src/api/types/CreateDeepSeekCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateDeepSeekCredentialDto { provider: "deep-seek"; diff --git a/src/api/types/CreateDeepgramCredentialDto.ts b/src/api/types/CreateDeepgramCredentialDto.ts index 41a69185..d84ee37e 100644 --- a/src/api/types/CreateDeepgramCredentialDto.ts +++ b/src/api/types/CreateDeepgramCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateDeepgramCredentialDto { provider: "deepgram"; diff --git a/src/api/types/CreateDtmfToolDto.ts b/src/api/types/CreateDtmfToolDto.ts index 6b61f551..5a051f13 100644 --- a/src/api/types/CreateDtmfToolDto.ts +++ b/src/api/types/CreateDtmfToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateDtmfToolDto { /** diff --git a/src/api/types/CreateDtmfToolDtoMessagesItem.ts b/src/api/types/CreateDtmfToolDtoMessagesItem.ts index 1c3c72a2..c442e8e4 100644 --- a/src/api/types/CreateDtmfToolDtoMessagesItem.ts +++ b/src/api/types/CreateDtmfToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateDtmfToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateElevenLabsCredentialDto.ts b/src/api/types/CreateElevenLabsCredentialDto.ts index 059aca37..5e82f6fd 100644 --- a/src/api/types/CreateElevenLabsCredentialDto.ts +++ b/src/api/types/CreateElevenLabsCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateElevenLabsCredentialDto { provider: "11labs"; diff --git a/src/api/types/CreateEndCallToolDto.ts b/src/api/types/CreateEndCallToolDto.ts index 55c1dbff..f50a9335 100644 --- a/src/api/types/CreateEndCallToolDto.ts +++ b/src/api/types/CreateEndCallToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateEndCallToolDto { /** diff --git a/src/api/types/CreateEndCallToolDtoMessagesItem.ts b/src/api/types/CreateEndCallToolDtoMessagesItem.ts index f32e8e78..90d0a75c 100644 --- a/src/api/types/CreateEndCallToolDtoMessagesItem.ts +++ b/src/api/types/CreateEndCallToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateEndCallToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateEvalDto.ts b/src/api/types/CreateEvalDto.ts index 86940afa..fe7a773b 100644 --- a/src/api/types/CreateEvalDto.ts +++ b/src/api/types/CreateEvalDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateEvalDto { /** @@ -27,5 +25,5 @@ export interface CreateEvalDto { * This is the type of the eval. * Currently it is fixed to `chat.mockConversation`. */ - type: "chat.mockConversation"; + type: Vapi.CreateEvalDtoType; } diff --git a/src/api/types/CreateEvalDtoMessagesItem.ts b/src/api/types/CreateEvalDtoMessagesItem.ts index e7009102..b770cfed 100644 --- a/src/api/types/CreateEvalDtoMessagesItem.ts +++ b/src/api/types/CreateEvalDtoMessagesItem.ts @@ -1,12 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateEvalDtoMessagesItem = | Vapi.ChatEvalAssistantMessageMock | Vapi.ChatEvalSystemMessageMock | Vapi.ChatEvalToolResponseMessageMock + | Vapi.ChatEvalToolResponseMessageEvaluation | Vapi.ChatEvalUserMessageMock | Vapi.ChatEvalAssistantMessageEvaluation; diff --git a/src/api/types/CreateEvalDtoType.ts b/src/api/types/CreateEvalDtoType.ts new file mode 100644 index 00000000..6ace9ea0 --- /dev/null +++ b/src/api/types/CreateEvalDtoType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the eval. + * Currently it is fixed to `chat.mockConversation`. + */ +export const CreateEvalDtoType = { + ChatMockConversation: "chat.mockConversation", +} as const; +export type CreateEvalDtoType = (typeof CreateEvalDtoType)[keyof typeof CreateEvalDtoType]; diff --git a/src/api/types/CreateFunctionToolDto.ts b/src/api/types/CreateFunctionToolDto.ts index 31ebd10b..2dc3cfd6 100644 --- a/src/api/types/CreateFunctionToolDto.ts +++ b/src/api/types/CreateFunctionToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateFunctionToolDto { /** diff --git a/src/api/types/CreateFunctionToolDtoMessagesItem.ts b/src/api/types/CreateFunctionToolDtoMessagesItem.ts index f379fa2d..5d3b65cc 100644 --- a/src/api/types/CreateFunctionToolDtoMessagesItem.ts +++ b/src/api/types/CreateFunctionToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateFunctionToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGcpCredentialDto.ts b/src/api/types/CreateGcpCredentialDto.ts index 034e94b0..a5ed4df9 100644 --- a/src/api/types/CreateGcpCredentialDto.ts +++ b/src/api/types/CreateGcpCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGcpCredentialDto { provider: "gcp"; diff --git a/src/api/types/CreateGhlToolDto.ts b/src/api/types/CreateGhlToolDto.ts index 93ccc469..4c2e11a2 100644 --- a/src/api/types/CreateGhlToolDto.ts +++ b/src/api/types/CreateGhlToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGhlToolDto { /** @@ -12,7 +10,7 @@ export interface CreateGhlToolDto { */ messages?: Vapi.CreateGhlToolDtoMessagesItem[]; /** The type of tool. "ghl" for GHL tool. */ - type: "ghl"; + type: Vapi.CreateGhlToolDtoType; metadata: Vapi.GhlToolMetadata; /** * This is the plan to reject a tool call based on the conversation state. diff --git a/src/api/types/CreateGhlToolDtoMessagesItem.ts b/src/api/types/CreateGhlToolDtoMessagesItem.ts index 02e14c77..e1d3f33b 100644 --- a/src/api/types/CreateGhlToolDtoMessagesItem.ts +++ b/src/api/types/CreateGhlToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateGhlToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGhlToolDtoType.ts b/src/api/types/CreateGhlToolDtoType.ts new file mode 100644 index 00000000..00321897 --- /dev/null +++ b/src/api/types/CreateGhlToolDtoType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "ghl" for GHL tool. */ +export const CreateGhlToolDtoType = { + Ghl: "ghl", +} as const; +export type CreateGhlToolDtoType = (typeof CreateGhlToolDtoType)[keyof typeof CreateGhlToolDtoType]; diff --git a/src/api/types/CreateGladiaCredentialDto.ts b/src/api/types/CreateGladiaCredentialDto.ts index 2c8260a8..546cc0a9 100644 --- a/src/api/types/CreateGladiaCredentialDto.ts +++ b/src/api/types/CreateGladiaCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateGladiaCredentialDto { provider: "gladia"; diff --git a/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDto.ts b/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDto.ts index e799b783..532dc625 100644 --- a/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDto.ts +++ b/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGoHighLevelCalendarAvailabilityToolDto { /** diff --git a/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.ts b/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.ts index 142e8571..75c5ed6c 100644 --- a/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.ts +++ b/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGoHighLevelCalendarEventCreateToolDto.ts b/src/api/types/CreateGoHighLevelCalendarEventCreateToolDto.ts index a68a220a..a9c1b5eb 100644 --- a/src/api/types/CreateGoHighLevelCalendarEventCreateToolDto.ts +++ b/src/api/types/CreateGoHighLevelCalendarEventCreateToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGoHighLevelCalendarEventCreateToolDto { /** diff --git a/src/api/types/CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem.ts b/src/api/types/CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem.ts index 91aada37..275f6930 100644 --- a/src/api/types/CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem.ts +++ b/src/api/types/CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGoHighLevelContactCreateToolDto.ts b/src/api/types/CreateGoHighLevelContactCreateToolDto.ts index 75eb3d7c..eed4b726 100644 --- a/src/api/types/CreateGoHighLevelContactCreateToolDto.ts +++ b/src/api/types/CreateGoHighLevelContactCreateToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGoHighLevelContactCreateToolDto { /** diff --git a/src/api/types/CreateGoHighLevelContactCreateToolDtoMessagesItem.ts b/src/api/types/CreateGoHighLevelContactCreateToolDtoMessagesItem.ts index 22c7fb82..e6f7c5bb 100644 --- a/src/api/types/CreateGoHighLevelContactCreateToolDtoMessagesItem.ts +++ b/src/api/types/CreateGoHighLevelContactCreateToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateGoHighLevelContactCreateToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGoHighLevelContactGetToolDto.ts b/src/api/types/CreateGoHighLevelContactGetToolDto.ts index c9fdb7c2..f490bec4 100644 --- a/src/api/types/CreateGoHighLevelContactGetToolDto.ts +++ b/src/api/types/CreateGoHighLevelContactGetToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGoHighLevelContactGetToolDto { /** diff --git a/src/api/types/CreateGoHighLevelContactGetToolDtoMessagesItem.ts b/src/api/types/CreateGoHighLevelContactGetToolDtoMessagesItem.ts index 8cacca66..d691545a 100644 --- a/src/api/types/CreateGoHighLevelContactGetToolDtoMessagesItem.ts +++ b/src/api/types/CreateGoHighLevelContactGetToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateGoHighLevelContactGetToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGoHighLevelCredentialDto.ts b/src/api/types/CreateGoHighLevelCredentialDto.ts index f757cf93..6e7d7e46 100644 --- a/src/api/types/CreateGoHighLevelCredentialDto.ts +++ b/src/api/types/CreateGoHighLevelCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateGoHighLevelCredentialDto { provider: "gohighlevel"; diff --git a/src/api/types/CreateGoHighLevelMcpCredentialDto.ts b/src/api/types/CreateGoHighLevelMcpCredentialDto.ts index 69e4cf35..ce33b8c6 100644 --- a/src/api/types/CreateGoHighLevelMcpCredentialDto.ts +++ b/src/api/types/CreateGoHighLevelMcpCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGoHighLevelMcpCredentialDto { provider: "ghl.oauth2-authorization"; diff --git a/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDto.ts b/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDto.ts index 84621d31..c85c555b 100644 --- a/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDto.ts +++ b/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGoogleCalendarCheckAvailabilityToolDto { /** diff --git a/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.ts b/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.ts index fcd34e0f..d8ce1253 100644 --- a/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.ts +++ b/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGoogleCalendarCreateEventToolDto.ts b/src/api/types/CreateGoogleCalendarCreateEventToolDto.ts index 798a88de..19f42fc4 100644 --- a/src/api/types/CreateGoogleCalendarCreateEventToolDto.ts +++ b/src/api/types/CreateGoogleCalendarCreateEventToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGoogleCalendarCreateEventToolDto { /** diff --git a/src/api/types/CreateGoogleCalendarCreateEventToolDtoMessagesItem.ts b/src/api/types/CreateGoogleCalendarCreateEventToolDtoMessagesItem.ts index 089bd104..163818b4 100644 --- a/src/api/types/CreateGoogleCalendarCreateEventToolDtoMessagesItem.ts +++ b/src/api/types/CreateGoogleCalendarCreateEventToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateGoogleCalendarCreateEventToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGoogleCalendarOAuth2AuthorizationCredentialDto.ts b/src/api/types/CreateGoogleCalendarOAuth2AuthorizationCredentialDto.ts index 25f69c39..b0335cde 100644 --- a/src/api/types/CreateGoogleCalendarOAuth2AuthorizationCredentialDto.ts +++ b/src/api/types/CreateGoogleCalendarOAuth2AuthorizationCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateGoogleCalendarOAuth2AuthorizationCredentialDto { provider: "google.calendar.oauth2-authorization"; diff --git a/src/api/types/CreateGoogleCalendarOAuth2ClientCredentialDto.ts b/src/api/types/CreateGoogleCalendarOAuth2ClientCredentialDto.ts index 843fa3c3..f31a98c4 100644 --- a/src/api/types/CreateGoogleCalendarOAuth2ClientCredentialDto.ts +++ b/src/api/types/CreateGoogleCalendarOAuth2ClientCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateGoogleCalendarOAuth2ClientCredentialDto { provider: "google.calendar.oauth2-client"; diff --git a/src/api/types/CreateGoogleCredentialDto.ts b/src/api/types/CreateGoogleCredentialDto.ts index 69f2bf38..0e548841 100644 --- a/src/api/types/CreateGoogleCredentialDto.ts +++ b/src/api/types/CreateGoogleCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateGoogleCredentialDto { provider: "google"; diff --git a/src/api/types/CreateGoogleSheetsOAuth2AuthorizationCredentialDto.ts b/src/api/types/CreateGoogleSheetsOAuth2AuthorizationCredentialDto.ts index 9a18fd4c..971944d8 100644 --- a/src/api/types/CreateGoogleSheetsOAuth2AuthorizationCredentialDto.ts +++ b/src/api/types/CreateGoogleSheetsOAuth2AuthorizationCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateGoogleSheetsOAuth2AuthorizationCredentialDto { provider: "google.sheets.oauth2-authorization"; diff --git a/src/api/types/CreateGoogleSheetsRowAppendToolDto.ts b/src/api/types/CreateGoogleSheetsRowAppendToolDto.ts index d740cb24..ef5c548f 100644 --- a/src/api/types/CreateGoogleSheetsRowAppendToolDto.ts +++ b/src/api/types/CreateGoogleSheetsRowAppendToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateGoogleSheetsRowAppendToolDto { /** diff --git a/src/api/types/CreateGoogleSheetsRowAppendToolDtoMessagesItem.ts b/src/api/types/CreateGoogleSheetsRowAppendToolDtoMessagesItem.ts index 47113f8b..1798f99e 100644 --- a/src/api/types/CreateGoogleSheetsRowAppendToolDtoMessagesItem.ts +++ b/src/api/types/CreateGoogleSheetsRowAppendToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateGoogleSheetsRowAppendToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateGroqCredentialDto.ts b/src/api/types/CreateGroqCredentialDto.ts index c468cef4..eeeaf98e 100644 --- a/src/api/types/CreateGroqCredentialDto.ts +++ b/src/api/types/CreateGroqCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateGroqCredentialDto { provider: "groq"; diff --git a/src/api/types/CreateHandoffToolDto.ts b/src/api/types/CreateHandoffToolDto.ts index 0ee840a5..b267bbfb 100644 --- a/src/api/types/CreateHandoffToolDto.ts +++ b/src/api/types/CreateHandoffToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateHandoffToolDto { /** diff --git a/src/api/types/CreateHandoffToolDtoDestinationsItem.ts b/src/api/types/CreateHandoffToolDtoDestinationsItem.ts index 51aab04a..beea567d 100644 --- a/src/api/types/CreateHandoffToolDtoDestinationsItem.ts +++ b/src/api/types/CreateHandoffToolDtoDestinationsItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateHandoffToolDtoDestinationsItem = Vapi.HandoffDestinationAssistant | Vapi.HandoffDestinationDynamic; diff --git a/src/api/types/CreateHandoffToolDtoMessagesItem.ts b/src/api/types/CreateHandoffToolDtoMessagesItem.ts index 185d883c..80f2e4a4 100644 --- a/src/api/types/CreateHandoffToolDtoMessagesItem.ts +++ b/src/api/types/CreateHandoffToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateHandoffToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateHumeCredentialDto.ts b/src/api/types/CreateHumeCredentialDto.ts index f35b8fbe..b3c6d0c7 100644 --- a/src/api/types/CreateHumeCredentialDto.ts +++ b/src/api/types/CreateHumeCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateHumeCredentialDto { provider: "hume"; diff --git a/src/api/types/CreateInflectionAiCredentialDto.ts b/src/api/types/CreateInflectionAiCredentialDto.ts index 992103af..4d45cc56 100644 --- a/src/api/types/CreateInflectionAiCredentialDto.ts +++ b/src/api/types/CreateInflectionAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateInflectionAiCredentialDto { provider: "inflection-ai"; diff --git a/src/api/types/CreateInworldCredentialDto.ts b/src/api/types/CreateInworldCredentialDto.ts index e98e60fe..cb3e79fd 100644 --- a/src/api/types/CreateInworldCredentialDto.ts +++ b/src/api/types/CreateInworldCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateInworldCredentialDto { provider: "inworld"; diff --git a/src/api/types/CreateLangfuseCredentialDto.ts b/src/api/types/CreateLangfuseCredentialDto.ts index 1ddbb2b6..e077eef0 100644 --- a/src/api/types/CreateLangfuseCredentialDto.ts +++ b/src/api/types/CreateLangfuseCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateLangfuseCredentialDto { provider: "langfuse"; diff --git a/src/api/types/CreateLineInsightFromCallTableDto.ts b/src/api/types/CreateLineInsightFromCallTableDto.ts new file mode 100644 index 00000000..8bb515b3 --- /dev/null +++ b/src/api/types/CreateLineInsightFromCallTableDto.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface CreateLineInsightFromCallTableDto { + /** This is the name of the Insight. */ + name?: string; + type: "line"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + /** This is the metadata for the insight. */ + metadata?: Vapi.LineInsightMetadata; + timeRange?: Vapi.InsightTimeRangeWithStep; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.CreateLineInsightFromCallTableDtoGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.CreateLineInsightFromCallTableDtoQueriesItem[]; +} diff --git a/src/api/types/CreateLineInsightFromCallTableDtoGroupBy.ts b/src/api/types/CreateLineInsightFromCallTableDtoGroupBy.ts new file mode 100644 index 00000000..5d1683b9 --- /dev/null +++ b/src/api/types/CreateLineInsightFromCallTableDtoGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const CreateLineInsightFromCallTableDtoGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type CreateLineInsightFromCallTableDtoGroupBy = + (typeof CreateLineInsightFromCallTableDtoGroupBy)[keyof typeof CreateLineInsightFromCallTableDtoGroupBy]; diff --git a/src/api/types/CreateLineInsightFromCallTableDtoQueriesItem.ts b/src/api/types/CreateLineInsightFromCallTableDtoQueriesItem.ts new file mode 100644 index 00000000..f210ba39 --- /dev/null +++ b/src/api/types/CreateLineInsightFromCallTableDtoQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type CreateLineInsightFromCallTableDtoQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/CreateLmntCredentialDto.ts b/src/api/types/CreateLmntCredentialDto.ts index 11c8fe37..50910c6a 100644 --- a/src/api/types/CreateLmntCredentialDto.ts +++ b/src/api/types/CreateLmntCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateLmntCredentialDto { provider: "lmnt"; diff --git a/src/api/types/CreateMakeCredentialDto.ts b/src/api/types/CreateMakeCredentialDto.ts index 6ae67b56..0f5f062e 100644 --- a/src/api/types/CreateMakeCredentialDto.ts +++ b/src/api/types/CreateMakeCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateMakeCredentialDto { provider: "make"; diff --git a/src/api/types/CreateMakeToolDto.ts b/src/api/types/CreateMakeToolDto.ts index 8cb0868a..e54d4a2b 100644 --- a/src/api/types/CreateMakeToolDto.ts +++ b/src/api/types/CreateMakeToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateMakeToolDto { /** @@ -12,7 +10,7 @@ export interface CreateMakeToolDto { */ messages?: Vapi.CreateMakeToolDtoMessagesItem[]; /** The type of tool. "make" for Make tool. */ - type: "make"; + type: Vapi.CreateMakeToolDtoType; metadata: Vapi.MakeToolMetadata; /** * This is the plan to reject a tool call based on the conversation state. diff --git a/src/api/types/CreateMakeToolDtoMessagesItem.ts b/src/api/types/CreateMakeToolDtoMessagesItem.ts index 2473d59d..30307a8f 100644 --- a/src/api/types/CreateMakeToolDtoMessagesItem.ts +++ b/src/api/types/CreateMakeToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateMakeToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateMakeToolDtoType.ts b/src/api/types/CreateMakeToolDtoType.ts new file mode 100644 index 00000000..8ac3b602 --- /dev/null +++ b/src/api/types/CreateMakeToolDtoType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "make" for Make tool. */ +export const CreateMakeToolDtoType = { + Make: "make", +} as const; +export type CreateMakeToolDtoType = (typeof CreateMakeToolDtoType)[keyof typeof CreateMakeToolDtoType]; diff --git a/src/api/types/CreateMcpToolDto.ts b/src/api/types/CreateMcpToolDto.ts index 5cdac87a..cc117fd5 100644 --- a/src/api/types/CreateMcpToolDto.ts +++ b/src/api/types/CreateMcpToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateMcpToolDto { /** diff --git a/src/api/types/CreateMcpToolDtoMessagesItem.ts b/src/api/types/CreateMcpToolDtoMessagesItem.ts index cde9db30..366fc304 100644 --- a/src/api/types/CreateMcpToolDtoMessagesItem.ts +++ b/src/api/types/CreateMcpToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateMcpToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateMinimaxCredentialDto.ts b/src/api/types/CreateMinimaxCredentialDto.ts index f3c0b71d..8322db79 100644 --- a/src/api/types/CreateMinimaxCredentialDto.ts +++ b/src/api/types/CreateMinimaxCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateMinimaxCredentialDto { provider: "minimax"; diff --git a/src/api/types/CreateMistralCredentialDto.ts b/src/api/types/CreateMistralCredentialDto.ts index f283a41f..3b15f880 100644 --- a/src/api/types/CreateMistralCredentialDto.ts +++ b/src/api/types/CreateMistralCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateMistralCredentialDto { provider: "mistral"; diff --git a/src/api/types/CreateNeuphonicCredentialDto.ts b/src/api/types/CreateNeuphonicCredentialDto.ts index 0c6f3c92..4f4be1b1 100644 --- a/src/api/types/CreateNeuphonicCredentialDto.ts +++ b/src/api/types/CreateNeuphonicCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateNeuphonicCredentialDto { provider: "neuphonic"; diff --git a/src/api/types/CreateOpenAiCredentialDto.ts b/src/api/types/CreateOpenAiCredentialDto.ts index 99870ac5..f2848cb5 100644 --- a/src/api/types/CreateOpenAiCredentialDto.ts +++ b/src/api/types/CreateOpenAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateOpenAiCredentialDto { provider: "openai"; diff --git a/src/api/types/CreateOpenRouterCredentialDto.ts b/src/api/types/CreateOpenRouterCredentialDto.ts index d4ef2003..d8fa4c33 100644 --- a/src/api/types/CreateOpenRouterCredentialDto.ts +++ b/src/api/types/CreateOpenRouterCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateOpenRouterCredentialDto { provider: "openrouter"; diff --git a/src/api/types/CreateOrgDto.ts b/src/api/types/CreateOrgDto.ts index 34c16e4b..fee4a4a9 100644 --- a/src/api/types/CreateOrgDto.ts +++ b/src/api/types/CreateOrgDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateOrgDto { /** diff --git a/src/api/types/CreateOrgDtoChannel.ts b/src/api/types/CreateOrgDtoChannel.ts index a8e0c576..27367ede 100644 --- a/src/api/types/CreateOrgDtoChannel.ts +++ b/src/api/types/CreateOrgDtoChannel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the channel of the org. There is the cluster the API traffic for the org will be directed. - */ -export type CreateOrgDtoChannel = "default" | "weekly"; +/** This is the channel of the org. There is the cluster the API traffic for the org will be directed. */ export const CreateOrgDtoChannel = { Default: "default", Weekly: "weekly", } as const; +export type CreateOrgDtoChannel = (typeof CreateOrgDtoChannel)[keyof typeof CreateOrgDtoChannel]; diff --git a/src/api/types/CreateOutboundCallDto.ts b/src/api/types/CreateOutboundCallDto.ts index 1bc158de..d2718746 100644 --- a/src/api/types/CreateOutboundCallDto.ts +++ b/src/api/types/CreateOutboundCallDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateOutboundCallDto { /** @@ -55,6 +53,11 @@ export interface CreateOutboundCallDto { * - Workflow, use `workflow` or `workflowId` */ squad?: Vapi.CreateSquadDto; + /** + * These are the overrides for the `squad` or `squadId`'s member settings and template variables. + * This will apply to all members of the squad. + */ + squadOverrides?: Vapi.AssistantOverrides; /** * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. * diff --git a/src/api/types/CreateOutputToolDto.ts b/src/api/types/CreateOutputToolDto.ts index f0be4336..b107b35c 100644 --- a/src/api/types/CreateOutputToolDto.ts +++ b/src/api/types/CreateOutputToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateOutputToolDto { /** @@ -12,7 +10,7 @@ export interface CreateOutputToolDto { */ messages?: Vapi.CreateOutputToolDtoMessagesItem[]; /** The type of tool. "output" for Output tool. */ - type: "output"; + type: Vapi.CreateOutputToolDtoType; /** * This is the plan to reject a tool call based on the conversation state. * diff --git a/src/api/types/CreateOutputToolDtoMessagesItem.ts b/src/api/types/CreateOutputToolDtoMessagesItem.ts index 00f5aaac..f3734f18 100644 --- a/src/api/types/CreateOutputToolDtoMessagesItem.ts +++ b/src/api/types/CreateOutputToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateOutputToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateOutputToolDtoType.ts b/src/api/types/CreateOutputToolDtoType.ts new file mode 100644 index 00000000..03f1cc88 --- /dev/null +++ b/src/api/types/CreateOutputToolDtoType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "output" for Output tool. */ +export const CreateOutputToolDtoType = { + Output: "output", +} as const; +export type CreateOutputToolDtoType = (typeof CreateOutputToolDtoType)[keyof typeof CreateOutputToolDtoType]; diff --git a/src/api/types/CreatePerplexityAiCredentialDto.ts b/src/api/types/CreatePerplexityAiCredentialDto.ts index 5d630dae..f8fa2c93 100644 --- a/src/api/types/CreatePerplexityAiCredentialDto.ts +++ b/src/api/types/CreatePerplexityAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreatePerplexityAiCredentialDto { provider: "perplexity-ai"; diff --git a/src/api/types/CreatePieInsightFromCallTableDto.ts b/src/api/types/CreatePieInsightFromCallTableDto.ts new file mode 100644 index 00000000..44dc8346 --- /dev/null +++ b/src/api/types/CreatePieInsightFromCallTableDto.ts @@ -0,0 +1,36 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface CreatePieInsightFromCallTableDto { + /** This is the name of the Insight. */ + name?: string; + type: "pie"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + timeRange?: Vapi.InsightTimeRange; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.CreatePieInsightFromCallTableDtoGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.CreatePieInsightFromCallTableDtoQueriesItem[]; +} diff --git a/src/api/types/CreatePieInsightFromCallTableDtoGroupBy.ts b/src/api/types/CreatePieInsightFromCallTableDtoGroupBy.ts new file mode 100644 index 00000000..662ebb23 --- /dev/null +++ b/src/api/types/CreatePieInsightFromCallTableDtoGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const CreatePieInsightFromCallTableDtoGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type CreatePieInsightFromCallTableDtoGroupBy = + (typeof CreatePieInsightFromCallTableDtoGroupBy)[keyof typeof CreatePieInsightFromCallTableDtoGroupBy]; diff --git a/src/api/types/CreatePieInsightFromCallTableDtoQueriesItem.ts b/src/api/types/CreatePieInsightFromCallTableDtoQueriesItem.ts new file mode 100644 index 00000000..d503da7a --- /dev/null +++ b/src/api/types/CreatePieInsightFromCallTableDtoQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type CreatePieInsightFromCallTableDtoQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/CreatePlayHtCredentialDto.ts b/src/api/types/CreatePlayHtCredentialDto.ts index 15f56824..3635ff87 100644 --- a/src/api/types/CreatePlayHtCredentialDto.ts +++ b/src/api/types/CreatePlayHtCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreatePlayHtCredentialDto { provider: "playht"; diff --git a/src/api/types/CreateQueryToolDto.ts b/src/api/types/CreateQueryToolDto.ts index 4ba659f1..539c58b2 100644 --- a/src/api/types/CreateQueryToolDto.ts +++ b/src/api/types/CreateQueryToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateQueryToolDto { /** diff --git a/src/api/types/CreateQueryToolDtoMessagesItem.ts b/src/api/types/CreateQueryToolDtoMessagesItem.ts index 88af00ee..3994539c 100644 --- a/src/api/types/CreateQueryToolDtoMessagesItem.ts +++ b/src/api/types/CreateQueryToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateQueryToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateRimeAiCredentialDto.ts b/src/api/types/CreateRimeAiCredentialDto.ts index 6c62e59c..c117d889 100644 --- a/src/api/types/CreateRimeAiCredentialDto.ts +++ b/src/api/types/CreateRimeAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateRimeAiCredentialDto { provider: "rime-ai"; diff --git a/src/api/types/CreateRunpodCredentialDto.ts b/src/api/types/CreateRunpodCredentialDto.ts index b41318d0..07b5cb4c 100644 --- a/src/api/types/CreateRunpodCredentialDto.ts +++ b/src/api/types/CreateRunpodCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateRunpodCredentialDto { provider: "runpod"; diff --git a/src/api/types/CreateS3CredentialDto.ts b/src/api/types/CreateS3CredentialDto.ts index 419555f2..ce115a8f 100644 --- a/src/api/types/CreateS3CredentialDto.ts +++ b/src/api/types/CreateS3CredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateS3CredentialDto { provider: "s3"; diff --git a/src/api/types/CreateScorecardDto.ts b/src/api/types/CreateScorecardDto.ts new file mode 100644 index 00000000..9cf8cf67 --- /dev/null +++ b/src/api/types/CreateScorecardDto.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface CreateScorecardDto { + /** This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. */ + name?: string; + /** This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. */ + description?: string; + /** + * 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. + */ + metrics: Vapi.ScorecardMetric[]; + /** + * 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. + */ + assistantIds?: string[]; +} diff --git a/src/api/types/CreateSesameVoiceDto.ts b/src/api/types/CreateSesameVoiceDto.ts index 2f69b09d..ec60e2a1 100644 --- a/src/api/types/CreateSesameVoiceDto.ts +++ b/src/api/types/CreateSesameVoiceDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateSesameVoiceDto { /** The name of the voice. */ diff --git a/src/api/types/CreateSlackOAuth2AuthorizationCredentialDto.ts b/src/api/types/CreateSlackOAuth2AuthorizationCredentialDto.ts index fff15274..df79f91e 100644 --- a/src/api/types/CreateSlackOAuth2AuthorizationCredentialDto.ts +++ b/src/api/types/CreateSlackOAuth2AuthorizationCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateSlackOAuth2AuthorizationCredentialDto { provider: "slack.oauth2-authorization"; diff --git a/src/api/types/CreateSlackSendMessageToolDto.ts b/src/api/types/CreateSlackSendMessageToolDto.ts index bc9c85cd..54ad7cf6 100644 --- a/src/api/types/CreateSlackSendMessageToolDto.ts +++ b/src/api/types/CreateSlackSendMessageToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateSlackSendMessageToolDto { /** diff --git a/src/api/types/CreateSlackSendMessageToolDtoMessagesItem.ts b/src/api/types/CreateSlackSendMessageToolDtoMessagesItem.ts index 6ef5128a..116f9f52 100644 --- a/src/api/types/CreateSlackSendMessageToolDtoMessagesItem.ts +++ b/src/api/types/CreateSlackSendMessageToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateSlackSendMessageToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateSmallestAiCredentialDto.ts b/src/api/types/CreateSmallestAiCredentialDto.ts index 29a5462a..d8c13f70 100644 --- a/src/api/types/CreateSmallestAiCredentialDto.ts +++ b/src/api/types/CreateSmallestAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateSmallestAiCredentialDto { provider: "smallest-ai"; diff --git a/src/api/types/CreateSmsToolDto.ts b/src/api/types/CreateSmsToolDto.ts index 490d19d8..51a1765a 100644 --- a/src/api/types/CreateSmsToolDto.ts +++ b/src/api/types/CreateSmsToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateSmsToolDto { /** diff --git a/src/api/types/CreateSmsToolDtoMessagesItem.ts b/src/api/types/CreateSmsToolDtoMessagesItem.ts index 066810a6..db5fa79d 100644 --- a/src/api/types/CreateSmsToolDtoMessagesItem.ts +++ b/src/api/types/CreateSmsToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateSmsToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateSpeechmaticsCredentialDto.ts b/src/api/types/CreateSpeechmaticsCredentialDto.ts index bd492d06..e52eb5f3 100644 --- a/src/api/types/CreateSpeechmaticsCredentialDto.ts +++ b/src/api/types/CreateSpeechmaticsCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateSpeechmaticsCredentialDto { provider: "speechmatics"; diff --git a/src/api/types/CreateSquadDto.ts b/src/api/types/CreateSquadDto.ts index 7507ff40..d1bbe600 100644 --- a/src/api/types/CreateSquadDto.ts +++ b/src/api/types/CreateSquadDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateSquadDto { /** This is the name of the squad. */ diff --git a/src/api/resources/structuredOutputs/client/requests/CreateStructuredOutputDto.ts b/src/api/types/CreateStructuredOutputDto.ts similarity index 90% rename from src/api/resources/structuredOutputs/client/requests/CreateStructuredOutputDto.ts rename to src/api/types/CreateStructuredOutputDto.ts index 01201afc..995d0142 100644 --- a/src/api/resources/structuredOutputs/client/requests/CreateStructuredOutputDto.ts +++ b/src/api/types/CreateStructuredOutputDto.ts @@ -1,18 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../../index.js"; +import type * as Vapi from "../index.js"; -/** - * @example - * { - * name: "name", - * schema: { - * type: "string" - * } - * } - */ export interface CreateStructuredOutputDto { /** * This is the model that will be used to extract the structured output. @@ -30,6 +19,8 @@ export interface CreateStructuredOutputDto { * If messages or required fields are not specified, the default system and user prompts will be used. */ model?: Vapi.CreateStructuredOutputDtoModel; + /** Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. */ + compliancePlan?: Vapi.ComplianceOverride; /** This is the name of the structured output. */ name: string; /** diff --git a/src/api/resources/structuredOutputs/types/CreateStructuredOutputDtoModel.ts b/src/api/types/CreateStructuredOutputDtoModel.ts similarity index 90% rename from src/api/resources/structuredOutputs/types/CreateStructuredOutputDtoModel.ts rename to src/api/types/CreateStructuredOutputDtoModel.ts index 52cec2a9..5748ff24 100644 --- a/src/api/resources/structuredOutputs/types/CreateStructuredOutputDtoModel.ts +++ b/src/api/types/CreateStructuredOutputDtoModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../../../index.js"; +import type * as Vapi from "../index.js"; /** * This is the model that will be used to extract the structured output. diff --git a/src/api/types/CreateSupabaseCredentialDto.ts b/src/api/types/CreateSupabaseCredentialDto.ts index 10be8977..78bbaa47 100644 --- a/src/api/types/CreateSupabaseCredentialDto.ts +++ b/src/api/types/CreateSupabaseCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateSupabaseCredentialDto { provider: "supabase"; diff --git a/src/api/types/CreateTavusCredentialDto.ts b/src/api/types/CreateTavusCredentialDto.ts index f717da06..db436495 100644 --- a/src/api/types/CreateTavusCredentialDto.ts +++ b/src/api/types/CreateTavusCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateTavusCredentialDto { provider: "tavus"; diff --git a/src/api/types/CreateTelnyxPhoneNumberDto.ts b/src/api/types/CreateTelnyxPhoneNumberDto.ts index be3b891f..169c481f 100644 --- a/src/api/types/CreateTelnyxPhoneNumberDto.ts +++ b/src/api/types/CreateTelnyxPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTelnyxPhoneNumberDto { /** diff --git a/src/api/types/CreateTelnyxPhoneNumberDtoFallbackDestination.ts b/src/api/types/CreateTelnyxPhoneNumberDtoFallbackDestination.ts index 73fc380e..53a1480b 100644 --- a/src/api/types/CreateTelnyxPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/CreateTelnyxPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/CreateTelnyxPhoneNumberDtoHooksItem.ts b/src/api/types/CreateTelnyxPhoneNumberDtoHooksItem.ts index 90217721..9778c272 100644 --- a/src/api/types/CreateTelnyxPhoneNumberDtoHooksItem.ts +++ b/src/api/types/CreateTelnyxPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateTelnyxPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/CreateTestSuiteDto.ts b/src/api/types/CreateTestSuiteDto.ts index a610e228..c7ec9f19 100644 --- a/src/api/types/CreateTestSuiteDto.ts +++ b/src/api/types/CreateTestSuiteDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTestSuiteDto { /** This is the name of the test suite. */ diff --git a/src/api/types/CreateTestSuiteRunDto.ts b/src/api/types/CreateTestSuiteRunDto.ts index 8146a8ef..3d301deb 100644 --- a/src/api/types/CreateTestSuiteRunDto.ts +++ b/src/api/types/CreateTestSuiteRunDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateTestSuiteRunDto { /** This is the name of the test suite run. */ diff --git a/src/api/types/CreateTestSuiteTestChatDto.ts b/src/api/types/CreateTestSuiteTestChatDto.ts index 2d60fd1c..f42fcb1a 100644 --- a/src/api/types/CreateTestSuiteTestChatDto.ts +++ b/src/api/types/CreateTestSuiteTestChatDto.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTestSuiteTestChatDto { /** These are the scorers used to evaluate the test. */ scorers: Vapi.TestSuiteTestScorerAi[]; /** This is the type of the test, which must be chat. */ - type: "chat"; + type: Vapi.CreateTestSuiteTestChatDtoType; /** This is the script to be used for the chat test. */ script: string; /** This is the number of attempts allowed for the test. */ diff --git a/src/api/types/CreateTestSuiteTestChatDtoType.ts b/src/api/types/CreateTestSuiteTestChatDtoType.ts new file mode 100644 index 00000000..1218d524 --- /dev/null +++ b/src/api/types/CreateTestSuiteTestChatDtoType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the test, which must be chat. */ +export const CreateTestSuiteTestChatDtoType = { + Chat: "chat", +} as const; +export type CreateTestSuiteTestChatDtoType = + (typeof CreateTestSuiteTestChatDtoType)[keyof typeof CreateTestSuiteTestChatDtoType]; diff --git a/src/api/types/CreateTestSuiteTestVoiceDto.ts b/src/api/types/CreateTestSuiteTestVoiceDto.ts index 4ce5686c..2cd838cc 100644 --- a/src/api/types/CreateTestSuiteTestVoiceDto.ts +++ b/src/api/types/CreateTestSuiteTestVoiceDto.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTestSuiteTestVoiceDto { /** These are the scorers used to evaluate the test. */ scorers: Vapi.TestSuiteTestScorerAi[]; /** This is the type of the test, which must be voice. */ - type: "voice"; + type: Vapi.CreateTestSuiteTestVoiceDtoType; /** This is the script to be used for the voice test. */ script: string; /** This is the number of attempts allowed for the test. */ diff --git a/src/api/types/CreateTestSuiteTestVoiceDtoType.ts b/src/api/types/CreateTestSuiteTestVoiceDtoType.ts new file mode 100644 index 00000000..680ba9be --- /dev/null +++ b/src/api/types/CreateTestSuiteTestVoiceDtoType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the test, which must be voice. */ +export const CreateTestSuiteTestVoiceDtoType = { + Voice: "voice", +} as const; +export type CreateTestSuiteTestVoiceDtoType = + (typeof CreateTestSuiteTestVoiceDtoType)[keyof typeof CreateTestSuiteTestVoiceDtoType]; diff --git a/src/api/types/CreateTextEditorToolDto.ts b/src/api/types/CreateTextEditorToolDto.ts index c56701e6..6a48f2c4 100644 --- a/src/api/types/CreateTextEditorToolDto.ts +++ b/src/api/types/CreateTextEditorToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTextEditorToolDto { /** @@ -13,7 +11,7 @@ export interface CreateTextEditorToolDto { messages?: Vapi.CreateTextEditorToolDtoMessagesItem[]; type: "textEditor"; /** The sub type of tool. */ - subType: "text_editor_20241022"; + subType: Vapi.CreateTextEditorToolDtoSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -26,7 +24,7 @@ export interface CreateTextEditorToolDto { */ server?: Vapi.Server; /** The name of the tool, fixed to 'str_replace_editor' */ - name: "str_replace_editor"; + name: Vapi.CreateTextEditorToolDtoName; /** * This is the plan to reject a tool call based on the conversation state. * diff --git a/src/api/types/CreateTextEditorToolDtoMessagesItem.ts b/src/api/types/CreateTextEditorToolDtoMessagesItem.ts index 42be8b9a..afe36dd2 100644 --- a/src/api/types/CreateTextEditorToolDtoMessagesItem.ts +++ b/src/api/types/CreateTextEditorToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateTextEditorToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateTextEditorToolDtoName.ts b/src/api/types/CreateTextEditorToolDtoName.ts new file mode 100644 index 00000000..ef2a04d3 --- /dev/null +++ b/src/api/types/CreateTextEditorToolDtoName.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'str_replace_editor' */ +export const CreateTextEditorToolDtoName = { + StrReplaceEditor: "str_replace_editor", +} as const; +export type CreateTextEditorToolDtoName = + (typeof CreateTextEditorToolDtoName)[keyof typeof CreateTextEditorToolDtoName]; diff --git a/src/api/types/CreateTextEditorToolDtoSubType.ts b/src/api/types/CreateTextEditorToolDtoSubType.ts new file mode 100644 index 00000000..d9a38d52 --- /dev/null +++ b/src/api/types/CreateTextEditorToolDtoSubType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const CreateTextEditorToolDtoSubType = { + TextEditor20241022: "text_editor_20241022", +} as const; +export type CreateTextEditorToolDtoSubType = + (typeof CreateTextEditorToolDtoSubType)[keyof typeof CreateTextEditorToolDtoSubType]; diff --git a/src/api/types/CreateTextInsightFromCallTableDto.ts b/src/api/types/CreateTextInsightFromCallTableDto.ts new file mode 100644 index 00000000..4f70e7c2 --- /dev/null +++ b/src/api/types/CreateTextInsightFromCallTableDto.ts @@ -0,0 +1,33 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface CreateTextInsightFromCallTableDto { + /** This is the name of the Insight. */ + name?: string; + type: "text"; + /** + * 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. + */ + formula?: Record; + timeRange?: Vapi.InsightTimeRange; + /** + * 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 + */ + queries: Vapi.CreateTextInsightFromCallTableDtoQueriesItem[]; +} diff --git a/src/api/types/CreateTextInsightFromCallTableDtoQueriesItem.ts b/src/api/types/CreateTextInsightFromCallTableDtoQueriesItem.ts new file mode 100644 index 00000000..5f93e30b --- /dev/null +++ b/src/api/types/CreateTextInsightFromCallTableDtoQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type CreateTextInsightFromCallTableDtoQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/CreateTogetherAiCredentialDto.ts b/src/api/types/CreateTogetherAiCredentialDto.ts index 1fb69b65..5ba1a045 100644 --- a/src/api/types/CreateTogetherAiCredentialDto.ts +++ b/src/api/types/CreateTogetherAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateTogetherAiCredentialDto { provider: "together-ai"; diff --git a/src/api/types/CreateTokenDto.ts b/src/api/types/CreateTokenDto.ts index 9dc19674..1bada30d 100644 --- a/src/api/types/CreateTokenDto.ts +++ b/src/api/types/CreateTokenDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTokenDto { /** This is the tag for the token. It represents its scope. */ diff --git a/src/api/types/CreateTokenDtoTag.ts b/src/api/types/CreateTokenDtoTag.ts index df5c76ce..27e2cfa2 100644 --- a/src/api/types/CreateTokenDtoTag.ts +++ b/src/api/types/CreateTokenDtoTag.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the tag for the token. It represents its scope. - */ -export type CreateTokenDtoTag = "private" | "public"; +/** This is the tag for the token. It represents its scope. */ export const CreateTokenDtoTag = { Private: "private", Public: "public", } as const; +export type CreateTokenDtoTag = (typeof CreateTokenDtoTag)[keyof typeof CreateTokenDtoTag]; diff --git a/src/api/types/CreateToolTemplateDto.ts b/src/api/types/CreateToolTemplateDto.ts index 5a4d6069..2b1645ce 100644 --- a/src/api/types/CreateToolTemplateDto.ts +++ b/src/api/types/CreateToolTemplateDto.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateToolTemplateDto { details?: Vapi.CreateToolTemplateDtoDetails; providerDetails?: Vapi.CreateToolTemplateDtoProviderDetails; metadata?: Vapi.ToolTemplateMetadata; visibility?: Vapi.CreateToolTemplateDtoVisibility; - type: "tool"; + type: Vapi.CreateToolTemplateDtoType; /** The name of the template. This is just for your own reference. */ name?: string; provider?: Vapi.CreateToolTemplateDtoProvider; diff --git a/src/api/types/CreateToolTemplateDtoDetails.ts b/src/api/types/CreateToolTemplateDtoDetails.ts index 3edf89c3..19248a68 100644 --- a/src/api/types/CreateToolTemplateDtoDetails.ts +++ b/src/api/types/CreateToolTemplateDtoDetails.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateToolTemplateDtoDetails = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/CreateToolTemplateDtoProvider.ts b/src/api/types/CreateToolTemplateDtoProvider.ts index c9fde390..27ee9153 100644 --- a/src/api/types/CreateToolTemplateDtoProvider.ts +++ b/src/api/types/CreateToolTemplateDtoProvider.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateToolTemplateDtoProvider = "make" | "gohighlevel" | "function"; export const CreateToolTemplateDtoProvider = { Make: "make", Gohighlevel: "gohighlevel", Function: "function", } as const; +export type CreateToolTemplateDtoProvider = + (typeof CreateToolTemplateDtoProvider)[keyof typeof CreateToolTemplateDtoProvider]; diff --git a/src/api/types/CreateToolTemplateDtoProviderDetails.ts b/src/api/types/CreateToolTemplateDtoProviderDetails.ts index f6da82a8..441aaa61 100644 --- a/src/api/types/CreateToolTemplateDtoProviderDetails.ts +++ b/src/api/types/CreateToolTemplateDtoProviderDetails.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateToolTemplateDtoProviderDetails = | Vapi.MakeToolProviderDetails diff --git a/src/api/types/CreateToolTemplateDtoType.ts b/src/api/types/CreateToolTemplateDtoType.ts new file mode 100644 index 00000000..a30dd6e3 --- /dev/null +++ b/src/api/types/CreateToolTemplateDtoType.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CreateToolTemplateDtoType = { + Tool: "tool", +} as const; +export type CreateToolTemplateDtoType = (typeof CreateToolTemplateDtoType)[keyof typeof CreateToolTemplateDtoType]; diff --git a/src/api/types/CreateToolTemplateDtoVisibility.ts b/src/api/types/CreateToolTemplateDtoVisibility.ts index c9c335ff..b4bc84e3 100644 --- a/src/api/types/CreateToolTemplateDtoVisibility.ts +++ b/src/api/types/CreateToolTemplateDtoVisibility.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateToolTemplateDtoVisibility = "public" | "private"; export const CreateToolTemplateDtoVisibility = { Public: "public", Private: "private", } as const; +export type CreateToolTemplateDtoVisibility = + (typeof CreateToolTemplateDtoVisibility)[keyof typeof CreateToolTemplateDtoVisibility]; diff --git a/src/api/types/CreateTransferCallToolDto.ts b/src/api/types/CreateTransferCallToolDto.ts index 42e86a76..f4f25a9f 100644 --- a/src/api/types/CreateTransferCallToolDto.ts +++ b/src/api/types/CreateTransferCallToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTransferCallToolDto { /** diff --git a/src/api/types/CreateTransferCallToolDtoDestinationsItem.ts b/src/api/types/CreateTransferCallToolDtoDestinationsItem.ts index fd02e05a..8a6dfed0 100644 --- a/src/api/types/CreateTransferCallToolDtoDestinationsItem.ts +++ b/src/api/types/CreateTransferCallToolDtoDestinationsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateTransferCallToolDtoDestinationsItem = | Vapi.TransferDestinationAssistant diff --git a/src/api/types/CreateTransferCallToolDtoMessagesItem.ts b/src/api/types/CreateTransferCallToolDtoMessagesItem.ts index 36e8f8ef..f305c254 100644 --- a/src/api/types/CreateTransferCallToolDtoMessagesItem.ts +++ b/src/api/types/CreateTransferCallToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateTransferCallToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateTrieveCredentialDto.ts b/src/api/types/CreateTrieveCredentialDto.ts index e38e6b27..de94bd95 100644 --- a/src/api/types/CreateTrieveCredentialDto.ts +++ b/src/api/types/CreateTrieveCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateTrieveCredentialDto { provider: "trieve"; diff --git a/src/api/types/CreateTrieveKnowledgeBaseDto.ts b/src/api/types/CreateTrieveKnowledgeBaseDto.ts index 4880b31e..3467fe4f 100644 --- a/src/api/types/CreateTrieveKnowledgeBaseDto.ts +++ b/src/api/types/CreateTrieveKnowledgeBaseDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTrieveKnowledgeBaseDto { /** @@ -10,7 +8,7 @@ export interface CreateTrieveKnowledgeBaseDto { * * To learn more about Trieve, visit https://trieve.ai. */ - provider: "trieve"; + provider: Vapi.CreateTrieveKnowledgeBaseDtoProvider; /** This is the name of the knowledge base. */ name?: string; /** diff --git a/src/api/types/CreateTrieveKnowledgeBaseDtoProvider.ts b/src/api/types/CreateTrieveKnowledgeBaseDtoProvider.ts new file mode 100644 index 00000000..f5bb0948 --- /dev/null +++ b/src/api/types/CreateTrieveKnowledgeBaseDtoProvider.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This knowledge base is provided by Trieve. + * + * To learn more about Trieve, visit https://trieve.ai. + */ +export const CreateTrieveKnowledgeBaseDtoProvider = { + Trieve: "trieve", +} as const; +export type CreateTrieveKnowledgeBaseDtoProvider = + (typeof CreateTrieveKnowledgeBaseDtoProvider)[keyof typeof CreateTrieveKnowledgeBaseDtoProvider]; diff --git a/src/api/types/CreateTwilioCredentialDto.ts b/src/api/types/CreateTwilioCredentialDto.ts index 840047e6..594de4d2 100644 --- a/src/api/types/CreateTwilioCredentialDto.ts +++ b/src/api/types/CreateTwilioCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateTwilioCredentialDto { provider: "twilio"; diff --git a/src/api/types/CreateTwilioPhoneNumberDto.ts b/src/api/types/CreateTwilioPhoneNumberDto.ts index b95d8a21..777eee1f 100644 --- a/src/api/types/CreateTwilioPhoneNumberDto.ts +++ b/src/api/types/CreateTwilioPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateTwilioPhoneNumberDto { /** diff --git a/src/api/types/CreateTwilioPhoneNumberDtoFallbackDestination.ts b/src/api/types/CreateTwilioPhoneNumberDtoFallbackDestination.ts index 59563d04..46e22510 100644 --- a/src/api/types/CreateTwilioPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/CreateTwilioPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/CreateTwilioPhoneNumberDtoHooksItem.ts b/src/api/types/CreateTwilioPhoneNumberDtoHooksItem.ts index 94095e7d..70cf04be 100644 --- a/src/api/types/CreateTwilioPhoneNumberDtoHooksItem.ts +++ b/src/api/types/CreateTwilioPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateTwilioPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/CreateVapiPhoneNumberDto.ts b/src/api/types/CreateVapiPhoneNumberDto.ts index cd103ca4..a19049ba 100644 --- a/src/api/types/CreateVapiPhoneNumberDto.ts +++ b/src/api/types/CreateVapiPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateVapiPhoneNumberDto { /** diff --git a/src/api/types/CreateVapiPhoneNumberDtoFallbackDestination.ts b/src/api/types/CreateVapiPhoneNumberDtoFallbackDestination.ts index 8754417f..db91c611 100644 --- a/src/api/types/CreateVapiPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/CreateVapiPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/CreateVapiPhoneNumberDtoHooksItem.ts b/src/api/types/CreateVapiPhoneNumberDtoHooksItem.ts index f408d763..71b4370a 100644 --- a/src/api/types/CreateVapiPhoneNumberDtoHooksItem.ts +++ b/src/api/types/CreateVapiPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateVapiPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/CreateVoicemailToolDto.ts b/src/api/types/CreateVoicemailToolDto.ts index 179f9451..ca9a11f8 100644 --- a/src/api/types/CreateVoicemailToolDto.ts +++ b/src/api/types/CreateVoicemailToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateVoicemailToolDto { /** @@ -12,7 +10,7 @@ export interface CreateVoicemailToolDto { */ messages?: Vapi.CreateVoicemailToolDtoMessagesItem[]; /** The type of tool. "voicemail" for Voicemail tool. */ - type: "voicemail"; + type: Vapi.CreateVoicemailToolDtoType; /** * This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls. * diff --git a/src/api/types/CreateVoicemailToolDtoMessagesItem.ts b/src/api/types/CreateVoicemailToolDtoMessagesItem.ts index 2fb4b724..3d39e6f8 100644 --- a/src/api/types/CreateVoicemailToolDtoMessagesItem.ts +++ b/src/api/types/CreateVoicemailToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateVoicemailToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/CreateVoicemailToolDtoType.ts b/src/api/types/CreateVoicemailToolDtoType.ts new file mode 100644 index 00000000..3aaa77b8 --- /dev/null +++ b/src/api/types/CreateVoicemailToolDtoType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "voicemail" for Voicemail tool. */ +export const CreateVoicemailToolDtoType = { + Voicemail: "voicemail", +} as const; +export type CreateVoicemailToolDtoType = (typeof CreateVoicemailToolDtoType)[keyof typeof CreateVoicemailToolDtoType]; diff --git a/src/api/types/CreateVonageCredentialDto.ts b/src/api/types/CreateVonageCredentialDto.ts index 67fdc3b1..60b8c22e 100644 --- a/src/api/types/CreateVonageCredentialDto.ts +++ b/src/api/types/CreateVonageCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateVonageCredentialDto { provider: "vonage"; diff --git a/src/api/types/CreateVonagePhoneNumberDto.ts b/src/api/types/CreateVonagePhoneNumberDto.ts index d39a390b..1336226c 100644 --- a/src/api/types/CreateVonagePhoneNumberDto.ts +++ b/src/api/types/CreateVonagePhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateVonagePhoneNumberDto { /** diff --git a/src/api/types/CreateVonagePhoneNumberDtoFallbackDestination.ts b/src/api/types/CreateVonagePhoneNumberDtoFallbackDestination.ts index fda5865d..57e13ba2 100644 --- a/src/api/types/CreateVonagePhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/CreateVonagePhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/CreateVonagePhoneNumberDtoHooksItem.ts b/src/api/types/CreateVonagePhoneNumberDtoHooksItem.ts index 11b4f4bb..84f2084f 100644 --- a/src/api/types/CreateVonagePhoneNumberDtoHooksItem.ts +++ b/src/api/types/CreateVonagePhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateVonagePhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/CreateWebCallDto.ts b/src/api/types/CreateWebCallDto.ts index fdfe2331..6f1af01f 100644 --- a/src/api/types/CreateWebCallDto.ts +++ b/src/api/types/CreateWebCallDto.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateWebCallDto { + roomDeleteOnUserLeaveEnabled?: boolean; /** * This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead. * @@ -43,6 +42,11 @@ export interface CreateWebCallDto { * - Workflow, use `workflow` or `workflowId` */ squad?: Vapi.CreateSquadDto; + /** + * These are the overrides for the `squad` or `squadId`'s member settings and template variables. + * This will apply to all members of the squad. + */ + squadOverrides?: Vapi.AssistantOverrides; /** * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. * diff --git a/src/api/types/CreateWebChatDto.ts b/src/api/types/CreateWebChatDto.ts index 5ea76b9a..940e4d28 100644 --- a/src/api/types/CreateWebChatDto.ts +++ b/src/api/types/CreateWebChatDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateWebChatDto { /** The assistant ID to use for this chat */ @@ -13,6 +11,11 @@ export interface CreateWebChatDto { * If not provided or expired, a new session will be created. */ sessionId?: string; + /** + * 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. + * If 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. + */ + sessionExpirationSeconds?: number; /** * These are the variable values that will be used to replace template variables in the assistant messages. * Only variable substitution is supported in web chat - other assistant properties cannot be overridden. diff --git a/src/api/types/CreateWebChatDtoInput.ts b/src/api/types/CreateWebChatDtoInput.ts index e1ffaa45..1c24dffc 100644 --- a/src/api/types/CreateWebChatDtoInput.ts +++ b/src/api/types/CreateWebChatDtoInput.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the input text for the chat. * Can be a string or an array of chat messages. */ -export type CreateWebChatDtoInput = string | Vapi.CreateWebChatDtoInputItem[]; +export type CreateWebChatDtoInput = string | Vapi.CreateWebChatDtoInputOneItem[]; diff --git a/src/api/types/CreateWebChatDtoInputItem.ts b/src/api/types/CreateWebChatDtoInputItem.ts deleted file mode 100644 index b22f49fb..00000000 --- a/src/api/types/CreateWebChatDtoInputItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index.js"; - -export type CreateWebChatDtoInputItem = - | Vapi.SystemMessage - | Vapi.UserMessage - | Vapi.AssistantMessage - | Vapi.ToolMessage - | Vapi.DeveloperMessage; diff --git a/src/api/types/CreateWebChatDtoInputOneItem.ts b/src/api/types/CreateWebChatDtoInputOneItem.ts new file mode 100644 index 00000000..c609eb13 --- /dev/null +++ b/src/api/types/CreateWebChatDtoInputOneItem.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type CreateWebChatDtoInputOneItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/CreateWebCustomerDto.ts b/src/api/types/CreateWebCustomerDto.ts index 40f7080a..1bbc776c 100644 --- a/src/api/types/CreateWebCustomerDto.ts +++ b/src/api/types/CreateWebCustomerDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateWebCustomerDto { /** diff --git a/src/api/types/CreateWebhookCredentialDto.ts b/src/api/types/CreateWebhookCredentialDto.ts index 5a180a8d..21f99883 100644 --- a/src/api/types/CreateWebhookCredentialDto.ts +++ b/src/api/types/CreateWebhookCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateWebhookCredentialDto { provider: "webhook"; diff --git a/src/api/types/CreateWebhookCredentialDtoAuthenticationPlan.ts b/src/api/types/CreateWebhookCredentialDtoAuthenticationPlan.ts index 40109671..cf525dfa 100644 --- a/src/api/types/CreateWebhookCredentialDtoAuthenticationPlan.ts +++ b/src/api/types/CreateWebhookCredentialDtoAuthenticationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. diff --git a/src/api/types/CreateWorkflowDto.ts b/src/api/types/CreateWorkflowDto.ts index fa4aa816..ac5489d1 100644 --- a/src/api/types/CreateWorkflowDto.ts +++ b/src/api/types/CreateWorkflowDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CreateWorkflowDto { nodes: Vapi.CreateWorkflowDtoNodesItem[]; diff --git a/src/api/types/CreateWorkflowDtoBackgroundSound.ts b/src/api/types/CreateWorkflowDtoBackgroundSound.ts index 9bd84ebc..c534376b 100644 --- a/src/api/types/CreateWorkflowDtoBackgroundSound.ts +++ b/src/api/types/CreateWorkflowDtoBackgroundSound.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. diff --git a/src/api/types/CreateWorkflowDtoBackgroundSoundZero.ts b/src/api/types/CreateWorkflowDtoBackgroundSoundZero.ts index c7590159..3c3d3d17 100644 --- a/src/api/types/CreateWorkflowDtoBackgroundSoundZero.ts +++ b/src/api/types/CreateWorkflowDtoBackgroundSoundZero.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreateWorkflowDtoBackgroundSoundZero = "off" | "office"; export const CreateWorkflowDtoBackgroundSoundZero = { Off: "off", Office: "office", } as const; +export type CreateWorkflowDtoBackgroundSoundZero = + (typeof CreateWorkflowDtoBackgroundSoundZero)[keyof typeof CreateWorkflowDtoBackgroundSoundZero]; diff --git a/src/api/types/CreateWorkflowDtoCredentialsItem.ts b/src/api/types/CreateWorkflowDtoCredentialsItem.ts index 8f87651c..daaaf3cb 100644 --- a/src/api/types/CreateWorkflowDtoCredentialsItem.ts +++ b/src/api/types/CreateWorkflowDtoCredentialsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateWorkflowDtoCredentialsItem = | Vapi.CreateElevenLabsCredentialDto diff --git a/src/api/types/CreateWorkflowDtoHooksItem.ts b/src/api/types/CreateWorkflowDtoHooksItem.ts index e5672138..996d3d7e 100644 --- a/src/api/types/CreateWorkflowDtoHooksItem.ts +++ b/src/api/types/CreateWorkflowDtoHooksItem.ts @@ -1,11 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateWorkflowDtoHooksItem = | Vapi.CallHookCallEnding | Vapi.CallHookAssistantSpeechInterrupted | Vapi.CallHookCustomerSpeechInterrupted - | Vapi.CallHookCustomerSpeechTimeout; + | Vapi.CallHookCustomerSpeechTimeout + | Vapi.CallHookModelResponseTimeout; diff --git a/src/api/types/CreateWorkflowDtoModel.ts b/src/api/types/CreateWorkflowDtoModel.ts index cf99ba3c..8f68bc5d 100644 --- a/src/api/types/CreateWorkflowDtoModel.ts +++ b/src/api/types/CreateWorkflowDtoModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the model for the workflow. diff --git a/src/api/types/CreateWorkflowDtoNodesItem.ts b/src/api/types/CreateWorkflowDtoNodesItem.ts index f8496b8f..99bc5d2c 100644 --- a/src/api/types/CreateWorkflowDtoNodesItem.ts +++ b/src/api/types/CreateWorkflowDtoNodesItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CreateWorkflowDtoNodesItem = Vapi.ConversationNode | Vapi.ToolNode; diff --git a/src/api/types/CreateWorkflowDtoTranscriber.ts b/src/api/types/CreateWorkflowDtoTranscriber.ts index 0013bac0..20559cbf 100644 --- a/src/api/types/CreateWorkflowDtoTranscriber.ts +++ b/src/api/types/CreateWorkflowDtoTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the transcriber for the workflow. diff --git a/src/api/types/CreateWorkflowDtoVoice.ts b/src/api/types/CreateWorkflowDtoVoice.ts index 89ace574..e9896582 100644 --- a/src/api/types/CreateWorkflowDtoVoice.ts +++ b/src/api/types/CreateWorkflowDtoVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voice for the workflow. diff --git a/src/api/types/CreateWorkflowDtoVoicemailDetection.ts b/src/api/types/CreateWorkflowDtoVoicemailDetection.ts index e876cb6b..bb09163b 100644 --- a/src/api/types/CreateWorkflowDtoVoicemailDetection.ts +++ b/src/api/types/CreateWorkflowDtoVoicemailDetection.ts @@ -1,13 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voicemail detection plan for the workflow. */ export type CreateWorkflowDtoVoicemailDetection = + | Vapi.CreateWorkflowDtoVoicemailDetectionZero | Vapi.GoogleVoicemailDetectionPlan | Vapi.OpenAiVoicemailDetectionPlan | Vapi.TwilioVoicemailDetectionPlan diff --git a/src/api/types/CreateWorkflowDtoVoicemailDetectionZero.ts b/src/api/types/CreateWorkflowDtoVoicemailDetectionZero.ts new file mode 100644 index 00000000..c54ea4ee --- /dev/null +++ b/src/api/types/CreateWorkflowDtoVoicemailDetectionZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CreateWorkflowDtoVoicemailDetectionZero = { + Off: "off", +} as const; +export type CreateWorkflowDtoVoicemailDetectionZero = + (typeof CreateWorkflowDtoVoicemailDetectionZero)[keyof typeof CreateWorkflowDtoVoicemailDetectionZero]; diff --git a/src/api/types/CreateXAiCredentialDto.ts b/src/api/types/CreateXAiCredentialDto.ts index a9422bf8..b1e039c7 100644 --- a/src/api/types/CreateXAiCredentialDto.ts +++ b/src/api/types/CreateXAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateXAiCredentialDto { provider: "xai"; diff --git a/src/api/types/CredentialActionRequest.ts b/src/api/types/CredentialActionRequest.ts index 3cae498a..3b22cb38 100644 --- a/src/api/types/CredentialActionRequest.ts +++ b/src/api/types/CredentialActionRequest.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CredentialActionRequest { action_name: string; diff --git a/src/api/types/CredentialEndUser.ts b/src/api/types/CredentialEndUser.ts index 37fb5c01..4e0048df 100644 --- a/src/api/types/CredentialEndUser.ts +++ b/src/api/types/CredentialEndUser.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CredentialEndUser { endUserId: string; diff --git a/src/api/types/CredentialSessionError.ts b/src/api/types/CredentialSessionError.ts index 76d61578..ed6578bc 100644 --- a/src/api/types/CredentialSessionError.ts +++ b/src/api/types/CredentialSessionError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CredentialSessionError { type: string; diff --git a/src/api/types/CredentialSessionResponse.ts b/src/api/types/CredentialSessionResponse.ts index 95d1dda8..a2b559cf 100644 --- a/src/api/types/CredentialSessionResponse.ts +++ b/src/api/types/CredentialSessionResponse.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CredentialSessionResponse { sessionToken: string; diff --git a/src/api/types/CredentialWebhookDto.ts b/src/api/types/CredentialWebhookDto.ts index 4a333b7c..38cf81b3 100644 --- a/src/api/types/CredentialWebhookDto.ts +++ b/src/api/types/CredentialWebhookDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CredentialWebhookDto { type: Vapi.CredentialWebhookDtoType; diff --git a/src/api/types/CredentialWebhookDtoAuthMode.ts b/src/api/types/CredentialWebhookDtoAuthMode.ts index 3f40d4ef..ea8bd4bc 100644 --- a/src/api/types/CredentialWebhookDtoAuthMode.ts +++ b/src/api/types/CredentialWebhookDtoAuthMode.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CredentialWebhookDtoAuthMode = "OAUTH2" | "API_KEY" | "BASIC"; export const CredentialWebhookDtoAuthMode = { Oauth2: "OAUTH2", ApiKey: "API_KEY", Basic: "BASIC", } as const; +export type CredentialWebhookDtoAuthMode = + (typeof CredentialWebhookDtoAuthMode)[keyof typeof CredentialWebhookDtoAuthMode]; diff --git a/src/api/types/CredentialWebhookDtoOperation.ts b/src/api/types/CredentialWebhookDtoOperation.ts index b35f3b98..6d2c6298 100644 --- a/src/api/types/CredentialWebhookDtoOperation.ts +++ b/src/api/types/CredentialWebhookDtoOperation.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CredentialWebhookDtoOperation = "creation" | "override" | "refresh"; export const CredentialWebhookDtoOperation = { Creation: "creation", Override: "override", Refresh: "refresh", } as const; +export type CredentialWebhookDtoOperation = + (typeof CredentialWebhookDtoOperation)[keyof typeof CredentialWebhookDtoOperation]; diff --git a/src/api/types/CredentialWebhookDtoType.ts b/src/api/types/CredentialWebhookDtoType.ts index fdb47fbc..d79cbb8b 100644 --- a/src/api/types/CredentialWebhookDtoType.ts +++ b/src/api/types/CredentialWebhookDtoType.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CredentialWebhookDtoType = "auth" | "sync" | "forward"; export const CredentialWebhookDtoType = { Auth: "auth", Sync: "sync", Forward: "forward", } as const; +export type CredentialWebhookDtoType = (typeof CredentialWebhookDtoType)[keyof typeof CredentialWebhookDtoType]; diff --git a/src/api/types/CustomCredential.ts b/src/api/types/CustomCredential.ts index 944fac45..8d9a7a4b 100644 --- a/src/api/types/CustomCredential.ts +++ b/src/api/types/CustomCredential.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomCredential { - provider: "custom-credential"; + provider: Vapi.CustomCredentialProvider; /** This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. */ authenticationPlan: Vapi.CustomCredentialAuthenticationPlan; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/CustomCredentialAuthenticationPlan.ts b/src/api/types/CustomCredentialAuthenticationPlan.ts index cf8cdf37..a6316d30 100644 --- a/src/api/types/CustomCredentialAuthenticationPlan.ts +++ b/src/api/types/CustomCredentialAuthenticationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. diff --git a/src/api/types/CustomCredentialProvider.ts b/src/api/types/CustomCredentialProvider.ts new file mode 100644 index 00000000..6b3bf20f --- /dev/null +++ b/src/api/types/CustomCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CustomCredentialProvider = { + CustomCredential: "custom-credential", +} as const; +export type CustomCredentialProvider = (typeof CustomCredentialProvider)[keyof typeof CustomCredentialProvider]; diff --git a/src/api/types/CustomEndpointingModelSmartEndpointingPlan.ts b/src/api/types/CustomEndpointingModelSmartEndpointingPlan.ts index dd5221c0..4d914c8b 100644 --- a/src/api/types/CustomEndpointingModelSmartEndpointingPlan.ts +++ b/src/api/types/CustomEndpointingModelSmartEndpointingPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomEndpointingModelSmartEndpointingPlan { /** This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported. */ diff --git a/src/api/types/CustomEndpointingModelSmartEndpointingPlanProvider.ts b/src/api/types/CustomEndpointingModelSmartEndpointingPlanProvider.ts index 5cb535ef..7fe43d20 100644 --- a/src/api/types/CustomEndpointingModelSmartEndpointingPlanProvider.ts +++ b/src/api/types/CustomEndpointingModelSmartEndpointingPlanProvider.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported. - */ -export type CustomEndpointingModelSmartEndpointingPlanProvider = "vapi" | "livekit" | "custom-endpointing-model"; +/** This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported. */ export const CustomEndpointingModelSmartEndpointingPlanProvider = { Vapi: "vapi", Livekit: "livekit", CustomEndpointingModel: "custom-endpointing-model", } as const; +export type CustomEndpointingModelSmartEndpointingPlanProvider = + (typeof CustomEndpointingModelSmartEndpointingPlanProvider)[keyof typeof CustomEndpointingModelSmartEndpointingPlanProvider]; diff --git a/src/api/types/CustomKnowledgeBase.ts b/src/api/types/CustomKnowledgeBase.ts index d20e0331..29e9bc6b 100644 --- a/src/api/types/CustomKnowledgeBase.ts +++ b/src/api/types/CustomKnowledgeBase.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomKnowledgeBase { /** This knowledge base is bring your own knowledge base implementation. */ - provider: "custom-knowledge-base"; + provider: Vapi.CustomKnowledgeBaseProvider; /** * This is where the knowledge base request will be sent. * diff --git a/src/api/types/CustomKnowledgeBaseProvider.ts b/src/api/types/CustomKnowledgeBaseProvider.ts new file mode 100644 index 00000000..67b525f7 --- /dev/null +++ b/src/api/types/CustomKnowledgeBaseProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This knowledge base is bring your own knowledge base implementation. */ +export const CustomKnowledgeBaseProvider = { + CustomKnowledgeBase: "custom-knowledge-base", +} as const; +export type CustomKnowledgeBaseProvider = + (typeof CustomKnowledgeBaseProvider)[keyof typeof CustomKnowledgeBaseProvider]; diff --git a/src/api/types/CustomLlmCredential.ts b/src/api/types/CustomLlmCredential.ts index d2fa3f4d..763a1865 100644 --- a/src/api/types/CustomLlmCredential.ts +++ b/src/api/types/CustomLlmCredential.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomLlmCredential { - provider: "custom-llm"; + provider: Vapi.CustomLlmCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey */ diff --git a/src/api/types/CustomLlmCredentialProvider.ts b/src/api/types/CustomLlmCredentialProvider.ts new file mode 100644 index 00000000..de495276 --- /dev/null +++ b/src/api/types/CustomLlmCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const CustomLlmCredentialProvider = { + CustomLlm: "custom-llm", +} as const; +export type CustomLlmCredentialProvider = + (typeof CustomLlmCredentialProvider)[keyof typeof CustomLlmCredentialProvider]; diff --git a/src/api/types/CustomLlmModel.ts b/src/api/types/CustomLlmModel.ts index ea74ced3..5f6155b1 100644 --- a/src/api/types/CustomLlmModel.ts +++ b/src/api/types/CustomLlmModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomLlmModel { /** This is the starting state for the conversation. */ @@ -22,7 +20,7 @@ export interface CustomLlmModel { /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; /** 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. */ - provider: "custom-llm"; + provider: Vapi.CustomLlmModelProvider; /** * This determines whether metadata is sent in requests to the custom provider. * diff --git a/src/api/types/CustomLlmModelMetadataSendMode.ts b/src/api/types/CustomLlmModelMetadataSendMode.ts index f84b21b3..16a0d344 100644 --- a/src/api/types/CustomLlmModelMetadataSendMode.ts +++ b/src/api/types/CustomLlmModelMetadataSendMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This determines whether metadata is sent in requests to the custom provider. @@ -13,9 +11,10 @@ * * Default is `variable`. */ -export type CustomLlmModelMetadataSendMode = "off" | "variable" | "destructured"; export const CustomLlmModelMetadataSendMode = { Off: "off", Variable: "variable", Destructured: "destructured", } as const; +export type CustomLlmModelMetadataSendMode = + (typeof CustomLlmModelMetadataSendMode)[keyof typeof CustomLlmModelMetadataSendMode]; diff --git a/src/api/types/CustomLlmModelProvider.ts b/src/api/types/CustomLlmModelProvider.ts new file mode 100644 index 00000000..db004741 --- /dev/null +++ b/src/api/types/CustomLlmModelProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** 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. */ +export const CustomLlmModelProvider = { + CustomLlm: "custom-llm", +} as const; +export type CustomLlmModelProvider = (typeof CustomLlmModelProvider)[keyof typeof CustomLlmModelProvider]; diff --git a/src/api/types/CustomLlmModelToolsItem.ts b/src/api/types/CustomLlmModelToolsItem.ts index fcf423b9..e2584bac 100644 --- a/src/api/types/CustomLlmModelToolsItem.ts +++ b/src/api/types/CustomLlmModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type CustomLlmModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/CustomMessage.ts b/src/api/types/CustomMessage.ts index cf6bfdcc..32889881 100644 --- a/src/api/types/CustomMessage.ts +++ b/src/api/types/CustomMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomMessage { /** @@ -16,7 +14,7 @@ export interface CustomMessage { */ contents?: Vapi.TextContent[]; /** This is a custom message. */ - type: "custom-message"; + type: Vapi.CustomMessageType; /** This is the content that the assistant will say when this message is triggered. */ content?: string; } diff --git a/src/api/types/CustomMessageType.ts b/src/api/types/CustomMessageType.ts new file mode 100644 index 00000000..b59e5656 --- /dev/null +++ b/src/api/types/CustomMessageType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is a custom message. */ +export const CustomMessageType = { + CustomMessage: "custom-message", +} as const; +export type CustomMessageType = (typeof CustomMessageType)[keyof typeof CustomMessageType]; diff --git a/src/api/types/CustomTranscriber.ts b/src/api/types/CustomTranscriber.ts index aa04b8d1..353bb073 100644 --- a/src/api/types/CustomTranscriber.ts +++ b/src/api/types/CustomTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomTranscriber { /** This is the transcription provider that will be used. Use `custom-transcriber` for providers that are not natively supported. */ - provider: "custom-transcriber"; + provider: Vapi.CustomTranscriberProvider; /** * This is where the transcription request will be sent. * diff --git a/src/api/types/CustomTranscriberProvider.ts b/src/api/types/CustomTranscriberProvider.ts new file mode 100644 index 00000000..32cb1ca0 --- /dev/null +++ b/src/api/types/CustomTranscriberProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. Use `custom-transcriber` for providers that are not natively supported. */ +export const CustomTranscriberProvider = { + CustomTranscriber: "custom-transcriber", +} as const; +export type CustomTranscriberProvider = (typeof CustomTranscriberProvider)[keyof typeof CustomTranscriberProvider]; diff --git a/src/api/types/CustomVoice.ts b/src/api/types/CustomVoice.ts index bf9526a6..8a5757c6 100644 --- a/src/api/types/CustomVoice.ts +++ b/src/api/types/CustomVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. Use `custom-voice` for providers that are not natively supported. */ - provider: "custom-voice"; + provider: Vapi.CustomVoiceProvider; /** This is the plan for chunking the model output before it is sent to the voice provider. */ chunkPlan?: Vapi.ChunkPlan; /** diff --git a/src/api/types/CustomVoiceProvider.ts b/src/api/types/CustomVoiceProvider.ts new file mode 100644 index 00000000..c04e462a --- /dev/null +++ b/src/api/types/CustomVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. Use `custom-voice` for providers that are not natively supported. */ +export const CustomVoiceProvider = { + CustomVoice: "custom-voice", +} as const; +export type CustomVoiceProvider = (typeof CustomVoiceProvider)[keyof typeof CustomVoiceProvider]; diff --git a/src/api/types/CustomerCustomEndpointingRule.ts b/src/api/types/CustomerCustomEndpointingRule.ts index f11c4b88..a4d656c8 100644 --- a/src/api/types/CustomerCustomEndpointingRule.ts +++ b/src/api/types/CustomerCustomEndpointingRule.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface CustomerCustomEndpointingRule { /** @@ -18,7 +16,7 @@ export interface CustomerCustomEndpointingRule { * Usage: * - If you want to wait longer while customer is speaking numbers, you can set a longer timeout. */ - type: "customer"; + type: Vapi.CustomerCustomEndpointingRuleType; /** * This is the regex pattern to match. * diff --git a/src/api/types/CustomerCustomEndpointingRuleType.ts b/src/api/types/CustomerCustomEndpointingRuleType.ts new file mode 100644 index 00000000..56537d36 --- /dev/null +++ b/src/api/types/CustomerCustomEndpointingRuleType.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This endpointing rule is based on current customer message as they are speaking. + * + * Flow: + * - Assistant speaks + * - Customer starts speaking + * - Customer transcription comes in + * - This rule is evaluated on the current customer transcription + * - If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds` + * + * Usage: + * - If you want to wait longer while customer is speaking numbers, you can set a longer timeout. + */ +export const CustomerCustomEndpointingRuleType = { + Customer: "customer", +} as const; +export type CustomerCustomEndpointingRuleType = + (typeof CustomerCustomEndpointingRuleType)[keyof typeof CustomerCustomEndpointingRuleType]; diff --git a/src/api/types/CustomerSpeechTimeoutOptions.ts b/src/api/types/CustomerSpeechTimeoutOptions.ts index d307b674..f0b9c83b 100644 --- a/src/api/types/CustomerSpeechTimeoutOptions.ts +++ b/src/api/types/CustomerSpeechTimeoutOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CustomerSpeechTimeoutOptions { /** diff --git a/src/api/types/DeepInfraCredential.ts b/src/api/types/DeepInfraCredential.ts index 693e4b38..102dbd6e 100644 --- a/src/api/types/DeepInfraCredential.ts +++ b/src/api/types/DeepInfraCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface DeepInfraCredential { - provider: "deepinfra"; + provider: Vapi.DeepInfraCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/DeepInfraCredentialProvider.ts b/src/api/types/DeepInfraCredentialProvider.ts new file mode 100644 index 00000000..6296337e --- /dev/null +++ b/src/api/types/DeepInfraCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const DeepInfraCredentialProvider = { + Deepinfra: "deepinfra", +} as const; +export type DeepInfraCredentialProvider = + (typeof DeepInfraCredentialProvider)[keyof typeof DeepInfraCredentialProvider]; diff --git a/src/api/types/DeepInfraModel.ts b/src/api/types/DeepInfraModel.ts index 3328c76a..70e6cb45 100644 --- a/src/api/types/DeepInfraModel.ts +++ b/src/api/types/DeepInfraModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface DeepInfraModel { /** This is the starting state for the conversation. */ @@ -21,7 +19,7 @@ export interface DeepInfraModel { toolIds?: string[]; /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; - provider: "deepinfra"; + provider: Vapi.DeepInfraModelProvider; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: string; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ diff --git a/src/api/types/DeepInfraModelProvider.ts b/src/api/types/DeepInfraModelProvider.ts new file mode 100644 index 00000000..f7d02251 --- /dev/null +++ b/src/api/types/DeepInfraModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const DeepInfraModelProvider = { + Deepinfra: "deepinfra", +} as const; +export type DeepInfraModelProvider = (typeof DeepInfraModelProvider)[keyof typeof DeepInfraModelProvider]; diff --git a/src/api/types/DeepInfraModelToolsItem.ts b/src/api/types/DeepInfraModelToolsItem.ts index 03113739..1e509055 100644 --- a/src/api/types/DeepInfraModelToolsItem.ts +++ b/src/api/types/DeepInfraModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type DeepInfraModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/DeepSeekCredential.ts b/src/api/types/DeepSeekCredential.ts index 76e24748..922239f0 100644 --- a/src/api/types/DeepSeekCredential.ts +++ b/src/api/types/DeepSeekCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface DeepSeekCredential { - provider: "deep-seek"; + provider: Vapi.DeepSeekCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/DeepSeekCredentialProvider.ts b/src/api/types/DeepSeekCredentialProvider.ts new file mode 100644 index 00000000..0df659f9 --- /dev/null +++ b/src/api/types/DeepSeekCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const DeepSeekCredentialProvider = { + DeepSeek: "deep-seek", +} as const; +export type DeepSeekCredentialProvider = (typeof DeepSeekCredentialProvider)[keyof typeof DeepSeekCredentialProvider]; diff --git a/src/api/types/DeepSeekModel.ts b/src/api/types/DeepSeekModel.ts index ec87bcea..e5950d60 100644 --- a/src/api/types/DeepSeekModel.ts +++ b/src/api/types/DeepSeekModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface DeepSeekModel { /** This is the starting state for the conversation. */ @@ -23,7 +21,7 @@ export interface DeepSeekModel { knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: Vapi.DeepSeekModelModel; - provider: "deep-seek"; + provider: Vapi.DeepSeekModelProvider; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ temperature?: number; /** This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. */ diff --git a/src/api/types/DeepSeekModelModel.ts b/src/api/types/DeepSeekModelModel.ts index 3a57a0c3..19dff090 100644 --- a/src/api/types/DeepSeekModelModel.ts +++ b/src/api/types/DeepSeekModelModel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b - */ -export type DeepSeekModelModel = "deepseek-chat" | "deepseek-reasoner"; +/** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ export const DeepSeekModelModel = { DeepseekChat: "deepseek-chat", DeepseekReasoner: "deepseek-reasoner", } as const; +export type DeepSeekModelModel = (typeof DeepSeekModelModel)[keyof typeof DeepSeekModelModel]; diff --git a/src/api/types/DeepSeekModelProvider.ts b/src/api/types/DeepSeekModelProvider.ts new file mode 100644 index 00000000..6312f6b2 --- /dev/null +++ b/src/api/types/DeepSeekModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const DeepSeekModelProvider = { + DeepSeek: "deep-seek", +} as const; +export type DeepSeekModelProvider = (typeof DeepSeekModelProvider)[keyof typeof DeepSeekModelProvider]; diff --git a/src/api/types/DeepSeekModelToolsItem.ts b/src/api/types/DeepSeekModelToolsItem.ts index 600b8429..b714d842 100644 --- a/src/api/types/DeepSeekModelToolsItem.ts +++ b/src/api/types/DeepSeekModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type DeepSeekModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/DeepgramCredential.ts b/src/api/types/DeepgramCredential.ts index 70514162..b00e756f 100644 --- a/src/api/types/DeepgramCredential.ts +++ b/src/api/types/DeepgramCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface DeepgramCredential { - provider: "deepgram"; + provider: Vapi.DeepgramCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/DeepgramCredentialProvider.ts b/src/api/types/DeepgramCredentialProvider.ts new file mode 100644 index 00000000..262b761d --- /dev/null +++ b/src/api/types/DeepgramCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const DeepgramCredentialProvider = { + Deepgram: "deepgram", +} as const; +export type DeepgramCredentialProvider = (typeof DeepgramCredentialProvider)[keyof typeof DeepgramCredentialProvider]; diff --git a/src/api/types/DeepgramTranscriber.ts b/src/api/types/DeepgramTranscriber.ts index e668ade6..b769ab09 100644 --- a/src/api/types/DeepgramTranscriber.ts +++ b/src/api/types/DeepgramTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface DeepgramTranscriber { /** This is the transcription provider that will be used. */ - provider: "deepgram"; + provider: Vapi.DeepgramTranscriberProvider; /** 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 */ model?: Vapi.DeepgramTranscriberModel; /** 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 */ diff --git a/src/api/types/DeepgramTranscriberLanguage.ts b/src/api/types/DeepgramTranscriberLanguage.ts index 253a35e9..908763ef 100644 --- a/src/api/types/DeepgramTranscriberLanguage.ts +++ b/src/api/types/DeepgramTranscriberLanguage.ts @@ -1,64 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type DeepgramTranscriberLanguage = - | "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"; export const DeepgramTranscriberLanguage = { Bg: "bg", Ca: "ca", @@ -117,3 +58,5 @@ export const DeepgramTranscriberLanguage = { ZhHant: "zh-Hant", ZhTw: "zh-TW", } as const; +export type DeepgramTranscriberLanguage = + (typeof DeepgramTranscriberLanguage)[keyof typeof DeepgramTranscriberLanguage]; diff --git a/src/api/types/DeepgramTranscriberModel.ts b/src/api/types/DeepgramTranscriberModel.ts index e443af6c..d5f9cb33 100644 --- a/src/api/types/DeepgramTranscriberModel.ts +++ b/src/api/types/DeepgramTranscriberModel.ts @@ -1,40 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type DeepgramTranscriberModel = - | "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"; export const DeepgramTranscriberModel = { + FluxGeneralEn: "flux-general-en", Nova3: "nova-3", Nova3General: "nova-3-general", Nova3Medical: "nova-3-medical", @@ -66,4 +33,6 @@ export const DeepgramTranscriberModel = { BaseConversationalai: "base-conversationalai", BaseVoicemail: "base-voicemail", BaseVideo: "base-video", + Whisper: "whisper", } as const; +export type DeepgramTranscriberModel = (typeof DeepgramTranscriberModel)[keyof typeof DeepgramTranscriberModel]; diff --git a/src/api/types/DeepgramTranscriberProvider.ts b/src/api/types/DeepgramTranscriberProvider.ts new file mode 100644 index 00000000..d4157238 --- /dev/null +++ b/src/api/types/DeepgramTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const DeepgramTranscriberProvider = { + Deepgram: "deepgram", +} as const; +export type DeepgramTranscriberProvider = + (typeof DeepgramTranscriberProvider)[keyof typeof DeepgramTranscriberProvider]; diff --git a/src/api/types/DeepgramVoice.ts b/src/api/types/DeepgramVoice.ts index 5501d850..a61d0484 100644 --- a/src/api/types/DeepgramVoice.ts +++ b/src/api/types/DeepgramVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface DeepgramVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "deepgram"; + provider: Vapi.DeepgramVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.DeepgramVoiceId; /** This is the model that will be used. Defaults to 'aura-2' when not specified. */ diff --git a/src/api/types/DeepgramVoiceId.ts b/src/api/types/DeepgramVoiceId.ts index f311adcc..423db662 100644 --- a/src/api/types/DeepgramVoiceId.ts +++ b/src/api/types/DeepgramVoiceId.ts @@ -1,66 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the provider-specific ID that will be used. - */ -export type DeepgramVoiceId = - | "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"; +/** This is the provider-specific ID that will be used. */ export const DeepgramVoiceId = { Asteria: "asteria", Luna: "luna", @@ -118,3 +58,4 @@ export const DeepgramVoiceId = { Selena: "selena", Javier: "javier", } as const; +export type DeepgramVoiceId = (typeof DeepgramVoiceId)[keyof typeof DeepgramVoiceId]; diff --git a/src/api/types/DeepgramVoiceModel.ts b/src/api/types/DeepgramVoiceModel.ts index 8e14ffb8..b0117ed3 100644 --- a/src/api/types/DeepgramVoiceModel.ts +++ b/src/api/types/DeepgramVoiceModel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. Defaults to 'aura-2' when not specified. - */ -export type DeepgramVoiceModel = "aura" | "aura-2"; +/** This is the model that will be used. Defaults to 'aura-2' when not specified. */ export const DeepgramVoiceModel = { Aura: "aura", Aura2: "aura-2", } as const; +export type DeepgramVoiceModel = (typeof DeepgramVoiceModel)[keyof typeof DeepgramVoiceModel]; diff --git a/src/api/types/DeepgramVoiceProvider.ts b/src/api/types/DeepgramVoiceProvider.ts new file mode 100644 index 00000000..38211073 --- /dev/null +++ b/src/api/types/DeepgramVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const DeepgramVoiceProvider = { + Deepgram: "deepgram", +} as const; +export type DeepgramVoiceProvider = (typeof DeepgramVoiceProvider)[keyof typeof DeepgramVoiceProvider]; diff --git a/src/api/types/DeveloperMessage.ts b/src/api/types/DeveloperMessage.ts index f1d4428c..73cbe6f0 100644 --- a/src/api/types/DeveloperMessage.ts +++ b/src/api/types/DeveloperMessage.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface DeveloperMessage { /** This is the role of the message author */ - role: "developer"; + role: Vapi.DeveloperMessageRole; /** This is the content of the developer message */ content: string; /** This is an optional name for the participant */ diff --git a/src/api/types/DeveloperMessageRole.ts b/src/api/types/DeveloperMessageRole.ts new file mode 100644 index 00000000..16ef5367 --- /dev/null +++ b/src/api/types/DeveloperMessageRole.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the role of the message author */ +export const DeveloperMessageRole = { + Developer: "developer", +} as const; +export type DeveloperMessageRole = (typeof DeveloperMessageRole)[keyof typeof DeveloperMessageRole]; diff --git a/src/api/types/DtmfTool.ts b/src/api/types/DtmfTool.ts index 16f86438..f5d2cf13 100644 --- a/src/api/types/DtmfTool.ts +++ b/src/api/types/DtmfTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface DtmfTool { /** diff --git a/src/api/types/DtmfToolMessagesItem.ts b/src/api/types/DtmfToolMessagesItem.ts index d477252a..b14c4004 100644 --- a/src/api/types/DtmfToolMessagesItem.ts +++ b/src/api/types/DtmfToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type DtmfToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/Edge.ts b/src/api/types/Edge.ts index 31bcfe98..4369c8b5 100644 --- a/src/api/types/Edge.ts +++ b/src/api/types/Edge.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Edge { condition?: Vapi.AiEdgeCondition; diff --git a/src/api/types/ElevenLabsCredential.ts b/src/api/types/ElevenLabsCredential.ts index fca29833..75101559 100644 --- a/src/api/types/ElevenLabsCredential.ts +++ b/src/api/types/ElevenLabsCredential.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ElevenLabsCredential { provider: "11labs"; diff --git a/src/api/types/ElevenLabsPronunciationDictionary.ts b/src/api/types/ElevenLabsPronunciationDictionary.ts index 4f01bb8d..468fd03f 100644 --- a/src/api/types/ElevenLabsPronunciationDictionary.ts +++ b/src/api/types/ElevenLabsPronunciationDictionary.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ElevenLabsPronunciationDictionary { /** The ID of the pronunciation dictionary */ diff --git a/src/api/types/ElevenLabsPronunciationDictionaryLocator.ts b/src/api/types/ElevenLabsPronunciationDictionaryLocator.ts index 2e31a9ac..7cb431fa 100644 --- a/src/api/types/ElevenLabsPronunciationDictionaryLocator.ts +++ b/src/api/types/ElevenLabsPronunciationDictionaryLocator.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ElevenLabsPronunciationDictionaryLocator { /** This is the ID of the pronunciation dictionary to use. */ diff --git a/src/api/types/ElevenLabsPronunciationDictionaryPermissionOnResource.ts b/src/api/types/ElevenLabsPronunciationDictionaryPermissionOnResource.ts index 3216d699..f8b44e2b 100644 --- a/src/api/types/ElevenLabsPronunciationDictionaryPermissionOnResource.ts +++ b/src/api/types/ElevenLabsPronunciationDictionaryPermissionOnResource.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The permission level on this resource - */ -export type ElevenLabsPronunciationDictionaryPermissionOnResource = "admin" | "editor" | "viewer"; +/** The permission level on this resource */ export const ElevenLabsPronunciationDictionaryPermissionOnResource = { Admin: "admin", Editor: "editor", Viewer: "viewer", } as const; +export type ElevenLabsPronunciationDictionaryPermissionOnResource = + (typeof ElevenLabsPronunciationDictionaryPermissionOnResource)[keyof typeof ElevenLabsPronunciationDictionaryPermissionOnResource]; diff --git a/src/api/types/ElevenLabsTranscriber.ts b/src/api/types/ElevenLabsTranscriber.ts index 8b948bdc..4cd43316 100644 --- a/src/api/types/ElevenLabsTranscriber.ts +++ b/src/api/types/ElevenLabsTranscriber.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ElevenLabsTranscriber { /** This is the transcription provider that will be used. */ - provider: "11labs"; + provider: Vapi.ElevenLabsTranscriberProvider; /** This is the model that will be used for the transcription. */ - model?: "scribe_v1"; + model?: Vapi.ElevenLabsTranscriberModel; language?: Vapi.ElevenLabsTranscriberLanguage; /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */ fallbackPlan?: Vapi.FallbackTranscriberPlan; diff --git a/src/api/types/ElevenLabsTranscriberLanguage.ts b/src/api/types/ElevenLabsTranscriberLanguage.ts index e5f9f650..c8bcd5f5 100644 --- a/src/api/types/ElevenLabsTranscriberLanguage.ts +++ b/src/api/types/ElevenLabsTranscriberLanguage.ts @@ -1,193 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type ElevenLabsTranscriberLanguage = - | "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"; export const ElevenLabsTranscriberLanguage = { Aa: "aa", Ab: "ab", @@ -375,3 +187,5 @@ export const ElevenLabsTranscriberLanguage = { Zh: "zh", Zu: "zu", } as const; +export type ElevenLabsTranscriberLanguage = + (typeof ElevenLabsTranscriberLanguage)[keyof typeof ElevenLabsTranscriberLanguage]; diff --git a/src/api/types/ElevenLabsTranscriberModel.ts b/src/api/types/ElevenLabsTranscriberModel.ts new file mode 100644 index 00000000..c5fbb233 --- /dev/null +++ b/src/api/types/ElevenLabsTranscriberModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used for the transcription. */ +export const ElevenLabsTranscriberModel = { + ScribeV1: "scribe_v1", +} as const; +export type ElevenLabsTranscriberModel = (typeof ElevenLabsTranscriberModel)[keyof typeof ElevenLabsTranscriberModel]; diff --git a/src/api/types/ElevenLabsTranscriberProvider.ts b/src/api/types/ElevenLabsTranscriberProvider.ts new file mode 100644 index 00000000..1511ccb7 --- /dev/null +++ b/src/api/types/ElevenLabsTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const ElevenLabsTranscriberProvider = { + ElevenLabs: "11labs", +} as const; +export type ElevenLabsTranscriberProvider = + (typeof ElevenLabsTranscriberProvider)[keyof typeof ElevenLabsTranscriberProvider]; diff --git a/src/api/types/ElevenLabsVoice.ts b/src/api/types/ElevenLabsVoice.ts index 01f01dd0..f981fbad 100644 --- a/src/api/types/ElevenLabsVoice.ts +++ b/src/api/types/ElevenLabsVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ElevenLabsVoice { /** This is the flag to toggle voice caching for the assistant. */ diff --git a/src/api/types/ElevenLabsVoiceId.ts b/src/api/types/ElevenLabsVoiceId.ts index 1ec7c565..7aa3d0ff 100644 --- a/src/api/types/ElevenLabsVoiceId.ts +++ b/src/api/types/ElevenLabsVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. diff --git a/src/api/types/ElevenLabsVoiceIdEnum.ts b/src/api/types/ElevenLabsVoiceIdEnum.ts index aa237d5a..3c37c2bb 100644 --- a/src/api/types/ElevenLabsVoiceIdEnum.ts +++ b/src/api/types/ElevenLabsVoiceIdEnum.ts @@ -1,23 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type ElevenLabsVoiceIdEnum = - | "burt" - | "marissa" - | "andrea" - | "sarah" - | "phillip" - | "steve" - | "joseph" - | "myra" - | "paula" - | "ryan" - | "drew" - | "paul" - | "mrb" - | "matilda" - | "mark"; export const ElevenLabsVoiceIdEnum = { Burt: "burt", Marissa: "marissa", @@ -35,3 +17,4 @@ export const ElevenLabsVoiceIdEnum = { Matilda: "matilda", Mark: "mark", } as const; +export type ElevenLabsVoiceIdEnum = (typeof ElevenLabsVoiceIdEnum)[keyof typeof ElevenLabsVoiceIdEnum]; diff --git a/src/api/types/ElevenLabsVoiceModel.ts b/src/api/types/ElevenLabsVoiceModel.ts index 3cf833d4..a9e79f87 100644 --- a/src/api/types/ElevenLabsVoiceModel.ts +++ b/src/api/types/ElevenLabsVoiceModel.ts @@ -1,17 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. Defaults to 'eleven_turbo_v2' if not specified. - */ -export type ElevenLabsVoiceModel = - | "eleven_multilingual_v2" - | "eleven_turbo_v2" - | "eleven_turbo_v2_5" - | "eleven_flash_v2" - | "eleven_flash_v2_5" - | "eleven_monolingual_v1"; +/** This is the model that will be used. Defaults to 'eleven_turbo_v2' if not specified. */ export const ElevenLabsVoiceModel = { ElevenMultilingualV2: "eleven_multilingual_v2", ElevenTurboV2: "eleven_turbo_v2", @@ -20,3 +9,4 @@ export const ElevenLabsVoiceModel = { ElevenFlashV25: "eleven_flash_v2_5", ElevenMonolingualV1: "eleven_monolingual_v1", } as const; +export type ElevenLabsVoiceModel = (typeof ElevenLabsVoiceModel)[keyof typeof ElevenLabsVoiceModel]; diff --git a/src/api/types/EndCallTool.ts b/src/api/types/EndCallTool.ts index b0c125c9..3b64635c 100644 --- a/src/api/types/EndCallTool.ts +++ b/src/api/types/EndCallTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EndCallTool { /** diff --git a/src/api/types/EndCallToolMessagesItem.ts b/src/api/types/EndCallToolMessagesItem.ts index edbe3b03..198d1125 100644 --- a/src/api/types/EndCallToolMessagesItem.ts +++ b/src/api/types/EndCallToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type EndCallToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/Eval.ts b/src/api/types/Eval.ts index c22611a6..67ed7839 100644 --- a/src/api/types/Eval.ts +++ b/src/api/types/Eval.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Eval { /** @@ -31,5 +29,5 @@ export interface Eval { * This is the type of the eval. * Currently it is fixed to `chat.mockConversation`. */ - type: "chat.mockConversation"; + type: Vapi.EvalType; } diff --git a/src/api/types/EvalAnthropicModel.ts b/src/api/types/EvalAnthropicModel.ts index 1418593c..38388aab 100644 --- a/src/api/types/EvalAnthropicModel.ts +++ b/src/api/types/EvalAnthropicModel.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalAnthropicModel { /** This is the provider of the model (`anthropic`). */ - provider: "anthropic"; + provider: Vapi.EvalAnthropicModelProvider; /** This is the specific model that will be used. */ model: Vapi.EvalAnthropicModelModel; /** @@ -23,4 +21,14 @@ export interface EvalAnthropicModel { * If 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. */ maxTokens?: number; + /** + * 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. + */ + messages: Record[]; } diff --git a/src/api/types/EvalAnthropicModelModel.ts b/src/api/types/EvalAnthropicModelModel.ts index e8051597..1c1fe7b4 100644 --- a/src/api/types/EvalAnthropicModelModel.ts +++ b/src/api/types/EvalAnthropicModelModel.ts @@ -1,22 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the specific model that will be used. - */ -export type EvalAnthropicModelModel = - | "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-sonnet-4-20250514" - | "claude-sonnet-4-5-20250929" - | "claude-haiku-4-5-20251001"; +/** This is the specific model that will be used. */ export const EvalAnthropicModelModel = { Claude3Opus20240229: "claude-3-opus-20240229", Claude3Sonnet20240229: "claude-3-sonnet-20240229", @@ -30,3 +14,4 @@ export const EvalAnthropicModelModel = { ClaudeSonnet4520250929: "claude-sonnet-4-5-20250929", ClaudeHaiku4520251001: "claude-haiku-4-5-20251001", } as const; +export type EvalAnthropicModelModel = (typeof EvalAnthropicModelModel)[keyof typeof EvalAnthropicModelModel]; diff --git a/src/api/types/EvalAnthropicModelProvider.ts b/src/api/types/EvalAnthropicModelProvider.ts new file mode 100644 index 00000000..fe8cf39e --- /dev/null +++ b/src/api/types/EvalAnthropicModelProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`anthropic`). */ +export const EvalAnthropicModelProvider = { + Anthropic: "anthropic", +} as const; +export type EvalAnthropicModelProvider = (typeof EvalAnthropicModelProvider)[keyof typeof EvalAnthropicModelProvider]; diff --git a/src/api/types/EvalCustomModel.ts b/src/api/types/EvalCustomModel.ts index 04e8b804..8093b22f 100644 --- a/src/api/types/EvalCustomModel.ts +++ b/src/api/types/EvalCustomModel.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface EvalCustomModel { /** This is the provider of the model (`custom-llm`). */ - provider: "custom-llm"; + provider: Vapi.EvalCustomModelProvider; /** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */ url: string; /** These are the headers we'll use for the OpenAI client's `headers`. */ @@ -20,4 +20,14 @@ export interface EvalCustomModel { * If 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. */ maxTokens?: number; + /** + * 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. + */ + messages: Record[]; } diff --git a/src/api/types/EvalCustomModelProvider.ts b/src/api/types/EvalCustomModelProvider.ts new file mode 100644 index 00000000..d652d2d3 --- /dev/null +++ b/src/api/types/EvalCustomModelProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`custom-llm`). */ +export const EvalCustomModelProvider = { + CustomLlm: "custom-llm", +} as const; +export type EvalCustomModelProvider = (typeof EvalCustomModelProvider)[keyof typeof EvalCustomModelProvider]; diff --git a/src/api/types/EvalGoogleModel.ts b/src/api/types/EvalGoogleModel.ts index d09b137b..7a58ce8e 100644 --- a/src/api/types/EvalGoogleModel.ts +++ b/src/api/types/EvalGoogleModel.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalGoogleModel { /** This is the provider of the model (`google`). */ - provider: "google"; + provider: Vapi.EvalGoogleModelProvider; /** This is the name of the model. Ex. gpt-4o */ model: Vapi.EvalGoogleModelModel; /** 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. */ @@ -16,4 +14,14 @@ export interface EvalGoogleModel { * If 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. */ maxTokens?: number; + /** + * 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. + */ + messages: Record[]; } diff --git a/src/api/types/EvalGoogleModelModel.ts b/src/api/types/EvalGoogleModelModel.ts index 83ce52a7..d49fd443 100644 --- a/src/api/types/EvalGoogleModelModel.ts +++ b/src/api/types/EvalGoogleModelModel.ts @@ -1,25 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the name of the model. Ex. gpt-4o - */ -export type EvalGoogleModelModel = - | "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"; +/** This is the name of the model. Ex. gpt-4o */ export const EvalGoogleModelModel = { Gemini25Pro: "gemini-2.5-pro", Gemini25Flash: "gemini-2.5-flash", @@ -36,3 +17,4 @@ export const EvalGoogleModelModel = { Gemini15Pro002: "gemini-1.5-pro-002", Gemini10Pro: "gemini-1.0-pro", } as const; +export type EvalGoogleModelModel = (typeof EvalGoogleModelModel)[keyof typeof EvalGoogleModelModel]; diff --git a/src/api/types/EvalGoogleModelProvider.ts b/src/api/types/EvalGoogleModelProvider.ts new file mode 100644 index 00000000..d2da0b75 --- /dev/null +++ b/src/api/types/EvalGoogleModelProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`google`). */ +export const EvalGoogleModelProvider = { + Google: "google", +} as const; +export type EvalGoogleModelProvider = (typeof EvalGoogleModelProvider)[keyof typeof EvalGoogleModelProvider]; diff --git a/src/api/types/EvalGroqModel.ts b/src/api/types/EvalGroqModel.ts index 3a1e5dec..b5a1b706 100644 --- a/src/api/types/EvalGroqModel.ts +++ b/src/api/types/EvalGroqModel.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalGroqModel { /** This is the provider of the model (`groq`). */ - provider: "groq"; + provider: Vapi.EvalGroqModelProvider; /** This is the name of the model. Ex. gpt-4o */ model: Vapi.EvalGroqModelModel; /** 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. */ @@ -16,4 +14,14 @@ export interface EvalGroqModel { * If 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. */ maxTokens?: number; + /** + * 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. + */ + messages: Record[]; } diff --git a/src/api/types/EvalGroqModelModel.ts b/src/api/types/EvalGroqModelModel.ts index 56e57c92..2e387a94 100644 --- a/src/api/types/EvalGroqModelModel.ts +++ b/src/api/types/EvalGroqModelModel.ts @@ -1,26 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the name of the model. Ex. gpt-4o - */ -export type EvalGroqModelModel = - | "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"; +/** This is the name of the model. Ex. gpt-4o */ export const EvalGroqModelModel = { OpenaiGptOss20B: "openai/gpt-oss-20b", OpenaiGptOss120B: "openai/gpt-oss-120b", @@ -38,3 +18,4 @@ export const EvalGroqModelModel = { CompoundBeta: "compound-beta", CompoundBetaMini: "compound-beta-mini", } as const; +export type EvalGroqModelModel = (typeof EvalGroqModelModel)[keyof typeof EvalGroqModelModel]; diff --git a/src/api/types/EvalGroqModelProvider.ts b/src/api/types/EvalGroqModelProvider.ts new file mode 100644 index 00000000..9ff307ec --- /dev/null +++ b/src/api/types/EvalGroqModelProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`groq`). */ +export const EvalGroqModelProvider = { + Groq: "groq", +} as const; +export type EvalGroqModelProvider = (typeof EvalGroqModelProvider)[keyof typeof EvalGroqModelProvider]; diff --git a/src/api/types/EvalMessagesItem.ts b/src/api/types/EvalMessagesItem.ts index 4726041f..d1266c5c 100644 --- a/src/api/types/EvalMessagesItem.ts +++ b/src/api/types/EvalMessagesItem.ts @@ -1,12 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type EvalMessagesItem = | Vapi.ChatEvalAssistantMessageMock | Vapi.ChatEvalSystemMessageMock | Vapi.ChatEvalToolResponseMessageMock + | Vapi.ChatEvalToolResponseMessageEvaluation | Vapi.ChatEvalUserMessageMock | Vapi.ChatEvalAssistantMessageEvaluation; diff --git a/src/api/types/EvalModelListOptions.ts b/src/api/types/EvalModelListOptions.ts index a8d12739..fcc15476 100644 --- a/src/api/types/EvalModelListOptions.ts +++ b/src/api/types/EvalModelListOptions.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalModelListOptions { /** This is the provider of the model. */ diff --git a/src/api/types/EvalModelListOptionsProvider.ts b/src/api/types/EvalModelListOptionsProvider.ts index d79256ef..58756574 100644 --- a/src/api/types/EvalModelListOptionsProvider.ts +++ b/src/api/types/EvalModelListOptionsProvider.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the provider of the model. - */ -export type EvalModelListOptionsProvider = "openai" | "anthropic" | "google" | "groq" | "custom-llm"; +/** This is the provider of the model. */ export const EvalModelListOptionsProvider = { Openai: "openai", Anthropic: "anthropic", @@ -13,3 +8,5 @@ export const EvalModelListOptionsProvider = { Groq: "groq", CustomLlm: "custom-llm", } as const; +export type EvalModelListOptionsProvider = + (typeof EvalModelListOptionsProvider)[keyof typeof EvalModelListOptionsProvider]; diff --git a/src/api/types/EvalOpenAiModel.ts b/src/api/types/EvalOpenAiModel.ts index 13d2a9cb..0923a46f 100644 --- a/src/api/types/EvalOpenAiModel.ts +++ b/src/api/types/EvalOpenAiModel.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalOpenAiModel { /** This is the provider of the model (`openai`). */ - provider: "openai"; + provider: Vapi.EvalOpenAiModelProvider; /** * This is the OpenAI model that will be used. * @@ -21,4 +19,14 @@ export interface EvalOpenAiModel { * If 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. */ maxTokens?: number; + /** + * 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. + */ + messages: Record[]; } diff --git a/src/api/types/EvalOpenAiModelModel.ts b/src/api/types/EvalOpenAiModelModel.ts index 5ae40ac0..d86a93c1 100644 --- a/src/api/types/EvalOpenAiModelModel.ts +++ b/src/api/types/EvalOpenAiModelModel.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the OpenAI model that will be used. @@ -8,101 +6,9 @@ * 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/. */ -export type EvalOpenAiModelModel = - | "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-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-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-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-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:australia" - | "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"; export const EvalOpenAiModelModel = { + Gpt51: "gpt-5.1", + Gpt51ChatLatest: "gpt-5.1-chat-latest", Gpt5: "gpt-5", Gpt5Mini: "gpt-5-mini", Gpt5Nano: "gpt-5-nano", @@ -197,3 +103,4 @@ export const EvalOpenAiModelModel = { Gpt35Turbo1106Canadaeast: "gpt-3.5-turbo-1106:canadaeast", Gpt35Turbo1106Westus: "gpt-3.5-turbo-1106:westus", } as const; +export type EvalOpenAiModelModel = (typeof EvalOpenAiModelModel)[keyof typeof EvalOpenAiModelModel]; diff --git a/src/api/types/EvalOpenAiModelProvider.ts b/src/api/types/EvalOpenAiModelProvider.ts new file mode 100644 index 00000000..de794dcc --- /dev/null +++ b/src/api/types/EvalOpenAiModelProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`openai`). */ +export const EvalOpenAiModelProvider = { + Openai: "openai", +} as const; +export type EvalOpenAiModelProvider = (typeof EvalOpenAiModelProvider)[keyof typeof EvalOpenAiModelProvider]; diff --git a/src/api/types/EvalPaginatedResponse.ts b/src/api/types/EvalPaginatedResponse.ts index d88a9f98..7795aece 100644 --- a/src/api/types/EvalPaginatedResponse.ts +++ b/src/api/types/EvalPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalPaginatedResponse { results: Vapi.Eval[]; diff --git a/src/api/types/EvalRun.ts b/src/api/types/EvalRun.ts index ba9fdaf6..ee9ba1b0 100644 --- a/src/api/types/EvalRun.ts +++ b/src/api/types/EvalRun.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalRun { /** @@ -35,11 +33,15 @@ export interface EvalRun { * 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. */ results: Vapi.EvalRunResult[]; + /** This is the cost of the eval or suite run in USD. */ + cost: number; + /** This is the break up of costs of the eval or suite run. */ + costs: Record[]; /** * This is the type of the run. * Currently it is fixed to `eval`. */ - type: "eval"; + type: Vapi.EvalRunType; /** This is the id of the eval that will be run. */ evalId?: string; } diff --git a/src/api/types/EvalRunEndedReason.ts b/src/api/types/EvalRunEndedReason.ts index ebd5e4c6..f7caa195 100644 --- a/src/api/types/EvalRunEndedReason.ts +++ b/src/api/types/EvalRunEndedReason.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the reason for the eval run to end. @@ -10,7 +8,6 @@ * When the eval run is cancelled by the user, the status is 'cancelled'. * When the eval run is cancelled by Vapi for any reason, the status is 'aborted'. */ -export type EvalRunEndedReason = "mockConversation.done" | "error" | "timeout" | "cancelled" | "aborted"; export const EvalRunEndedReason = { MockConversationDone: "mockConversation.done", Error: "error", @@ -18,3 +15,4 @@ export const EvalRunEndedReason = { Cancelled: "cancelled", Aborted: "aborted", } as const; +export type EvalRunEndedReason = (typeof EvalRunEndedReason)[keyof typeof EvalRunEndedReason]; diff --git a/src/api/types/EvalRunPaginatedResponse.ts b/src/api/types/EvalRunPaginatedResponse.ts index 59caf5fb..0bf7ef2e 100644 --- a/src/api/types/EvalRunPaginatedResponse.ts +++ b/src/api/types/EvalRunPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalRunPaginatedResponse { results: Vapi.EvalRun[]; diff --git a/src/api/types/EvalRunResult.ts b/src/api/types/EvalRunResult.ts index 6939c93c..28f16977 100644 --- a/src/api/types/EvalRunResult.ts +++ b/src/api/types/EvalRunResult.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalRunResult { /** diff --git a/src/api/types/EvalRunResultMessagesItem.ts b/src/api/types/EvalRunResultMessagesItem.ts index e4dfb4b7..30ed2b4b 100644 --- a/src/api/types/EvalRunResultMessagesItem.ts +++ b/src/api/types/EvalRunResultMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type EvalRunResultMessagesItem = | Vapi.ChatEvalUserMessageMock diff --git a/src/api/types/EvalRunResultStatus.ts b/src/api/types/EvalRunResultStatus.ts index 5d2dcfec..9a62ae0e 100644 --- a/src/api/types/EvalRunResultStatus.ts +++ b/src/api/types/EvalRunResultStatus.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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. */ -export type EvalRunResultStatus = "pass" | "fail"; export const EvalRunResultStatus = { Pass: "pass", Fail: "fail", } as const; +export type EvalRunResultStatus = (typeof EvalRunResultStatus)[keyof typeof EvalRunResultStatus]; diff --git a/src/api/types/EvalRunStatus.ts b/src/api/types/EvalRunStatus.ts index bdc283ad..2eab95bd 100644 --- a/src/api/types/EvalRunStatus.ts +++ b/src/api/types/EvalRunStatus.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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'. */ -export type EvalRunStatus = "running" | "ended" | "queued"; export const EvalRunStatus = { Running: "running", Ended: "ended", Queued: "queued", } as const; +export type EvalRunStatus = (typeof EvalRunStatus)[keyof typeof EvalRunStatus]; diff --git a/src/api/types/EvalRunTarget.ts b/src/api/types/EvalRunTarget.ts index 80da69c4..ad881029 100644 --- a/src/api/types/EvalRunTarget.ts +++ b/src/api/types/EvalRunTarget.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the target that will be run against the eval diff --git a/src/api/types/EvalRunTargetAssistant.ts b/src/api/types/EvalRunTargetAssistant.ts index 27b93c7e..4d915e79 100644 --- a/src/api/types/EvalRunTargetAssistant.ts +++ b/src/api/types/EvalRunTargetAssistant.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalRunTargetAssistant { /** This is the transient assistant that will be run against the eval */ @@ -13,7 +11,7 @@ export interface EvalRunTargetAssistant { * This is the type of the target. * Currently it is fixed to `assistant`. */ - type: "assistant"; + type: Vapi.EvalRunTargetAssistantType; /** This is the id of the assistant that will be run against the eval */ assistantId?: string; } diff --git a/src/api/types/EvalRunTargetAssistantType.ts b/src/api/types/EvalRunTargetAssistantType.ts new file mode 100644 index 00000000..f50c8d2d --- /dev/null +++ b/src/api/types/EvalRunTargetAssistantType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the target. + * Currently it is fixed to `assistant`. + */ +export const EvalRunTargetAssistantType = { + Assistant: "assistant", +} as const; +export type EvalRunTargetAssistantType = (typeof EvalRunTargetAssistantType)[keyof typeof EvalRunTargetAssistantType]; diff --git a/src/api/types/EvalRunTargetSquad.ts b/src/api/types/EvalRunTargetSquad.ts index ae43ea85..6f9c9e39 100644 --- a/src/api/types/EvalRunTargetSquad.ts +++ b/src/api/types/EvalRunTargetSquad.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalRunTargetSquad { /** This is the transient squad that will be run against the eval */ @@ -13,7 +11,7 @@ export interface EvalRunTargetSquad { * This is the type of the target. * Currently it is fixed to `squad`. */ - type: "squad"; + type: Vapi.EvalRunTargetSquadType; /** This is the id of the squad that will be run against the eval */ squadId?: string; } diff --git a/src/api/types/EvalRunTargetSquadType.ts b/src/api/types/EvalRunTargetSquadType.ts new file mode 100644 index 00000000..8339a28f --- /dev/null +++ b/src/api/types/EvalRunTargetSquadType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the target. + * Currently it is fixed to `squad`. + */ +export const EvalRunTargetSquadType = { + Squad: "squad", +} as const; +export type EvalRunTargetSquadType = (typeof EvalRunTargetSquadType)[keyof typeof EvalRunTargetSquadType]; diff --git a/src/api/types/EvalRunType.ts b/src/api/types/EvalRunType.ts new file mode 100644 index 00000000..5accf0b3 --- /dev/null +++ b/src/api/types/EvalRunType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the run. + * Currently it is fixed to `eval`. + */ +export const EvalRunType = { + Eval: "eval", +} as const; +export type EvalRunType = (typeof EvalRunType)[keyof typeof EvalRunType]; diff --git a/src/api/types/EvalType.ts b/src/api/types/EvalType.ts new file mode 100644 index 00000000..9d42b1a3 --- /dev/null +++ b/src/api/types/EvalType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the eval. + * Currently it is fixed to `chat.mockConversation`. + */ +export const EvalType = { + ChatMockConversation: "chat.mockConversation", +} as const; +export type EvalType = (typeof EvalType)[keyof typeof EvalType]; diff --git a/src/api/types/EvalUserEditable.ts b/src/api/types/EvalUserEditable.ts index dfcaa9b4..72c4cb19 100644 --- a/src/api/types/EvalUserEditable.ts +++ b/src/api/types/EvalUserEditable.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface EvalUserEditable { /** @@ -27,5 +25,5 @@ export interface EvalUserEditable { * This is the type of the eval. * Currently it is fixed to `chat.mockConversation`. */ - type: "chat.mockConversation"; + type: Vapi.EvalUserEditableType; } diff --git a/src/api/types/EvalUserEditableMessagesItem.ts b/src/api/types/EvalUserEditableMessagesItem.ts index 769803e9..a0e6ebdf 100644 --- a/src/api/types/EvalUserEditableMessagesItem.ts +++ b/src/api/types/EvalUserEditableMessagesItem.ts @@ -1,12 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type EvalUserEditableMessagesItem = | Vapi.ChatEvalAssistantMessageMock | Vapi.ChatEvalSystemMessageMock | Vapi.ChatEvalToolResponseMessageMock + | Vapi.ChatEvalToolResponseMessageEvaluation | Vapi.ChatEvalUserMessageMock | Vapi.ChatEvalAssistantMessageEvaluation; diff --git a/src/api/types/EvalUserEditableType.ts b/src/api/types/EvalUserEditableType.ts new file mode 100644 index 00000000..e33a6c3e --- /dev/null +++ b/src/api/types/EvalUserEditableType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the eval. + * Currently it is fixed to `chat.mockConversation`. + */ +export const EvalUserEditableType = { + ChatMockConversation: "chat.mockConversation", +} as const; +export type EvalUserEditableType = (typeof EvalUserEditableType)[keyof typeof EvalUserEditableType]; diff --git a/src/api/types/ExactReplacement.ts b/src/api/types/ExactReplacement.ts index b64b5116..a0b8cdcd 100644 --- a/src/api/types/ExactReplacement.ts +++ b/src/api/types/ExactReplacement.ts @@ -1,6 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ExactReplacement { /** @@ -13,7 +13,7 @@ export interface ExactReplacement { * - Replace an acronym: { type: 'exact', key: 'AI', value: 'Artificial Intelligence' } * - Replace a company name with its phonetic pronunciation: { type: 'exact', key: 'Vapi', value: 'Vappy' } */ - type: "exact"; + type: Vapi.ExactReplacementType; /** * 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. * Examples: diff --git a/src/api/types/ExactReplacementType.ts b/src/api/types/ExactReplacementType.ts new file mode 100644 index 00000000..032fb799 --- /dev/null +++ b/src/api/types/ExactReplacementType.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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' } + */ +export const ExactReplacementType = { + Exact: "exact", +} as const; +export type ExactReplacementType = (typeof ExactReplacementType)[keyof typeof ExactReplacementType]; diff --git a/src/api/types/FailedEdgeCondition.ts b/src/api/types/FailedEdgeCondition.ts index 90cf0bc3..d3738e90 100644 --- a/src/api/types/FailedEdgeCondition.ts +++ b/src/api/types/FailedEdgeCondition.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FailedEdgeCondition = unknown; diff --git a/src/api/types/FallbackAssemblyAiTranscriber.ts b/src/api/types/FallbackAssemblyAiTranscriber.ts index 626ba023..da937f2d 100644 --- a/src/api/types/FallbackAssemblyAiTranscriber.ts +++ b/src/api/types/FallbackAssemblyAiTranscriber.ts @@ -1,12 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface FallbackAssemblyAiTranscriber { /** This is the transcription provider that will be used. */ - provider: "assembly-ai"; + provider: Vapi.FallbackAssemblyAiTranscriberProvider; /** This is the language that will be set for the transcription. */ - language?: "en"; + language?: Vapi.FallbackAssemblyAiTranscriberLanguage; /** * Transcripts below this confidence threshold will be discarded. * diff --git a/src/api/types/FallbackAssemblyAiTranscriberLanguage.ts b/src/api/types/FallbackAssemblyAiTranscriberLanguage.ts new file mode 100644 index 00000000..ce7abea6 --- /dev/null +++ b/src/api/types/FallbackAssemblyAiTranscriberLanguage.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the language that will be set for the transcription. */ +export const FallbackAssemblyAiTranscriberLanguage = { + En: "en", +} as const; +export type FallbackAssemblyAiTranscriberLanguage = + (typeof FallbackAssemblyAiTranscriberLanguage)[keyof typeof FallbackAssemblyAiTranscriberLanguage]; diff --git a/src/api/types/FallbackAssemblyAiTranscriberProvider.ts b/src/api/types/FallbackAssemblyAiTranscriberProvider.ts new file mode 100644 index 00000000..991ba396 --- /dev/null +++ b/src/api/types/FallbackAssemblyAiTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackAssemblyAiTranscriberProvider = { + AssemblyAi: "assembly-ai", +} as const; +export type FallbackAssemblyAiTranscriberProvider = + (typeof FallbackAssemblyAiTranscriberProvider)[keyof typeof FallbackAssemblyAiTranscriberProvider]; diff --git a/src/api/types/FallbackAzureSpeechTranscriber.ts b/src/api/types/FallbackAzureSpeechTranscriber.ts index 32198b2f..293200da 100644 --- a/src/api/types/FallbackAzureSpeechTranscriber.ts +++ b/src/api/types/FallbackAzureSpeechTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackAzureSpeechTranscriber { /** This is the transcription provider that will be used. */ - provider: "azure"; + provider: Vapi.FallbackAzureSpeechTranscriberProvider; /** 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 */ language?: Vapi.FallbackAzureSpeechTranscriberLanguage; /** Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation. */ diff --git a/src/api/types/FallbackAzureSpeechTranscriberLanguage.ts b/src/api/types/FallbackAzureSpeechTranscriberLanguage.ts index 9f5c4790..8b73e003 100644 --- a/src/api/types/FallbackAzureSpeechTranscriberLanguage.ts +++ b/src/api/types/FallbackAzureSpeechTranscriberLanguage.ts @@ -1,154 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * 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 - */ -export type FallbackAzureSpeechTranscriberLanguage = - | "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"; +/** 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 */ export const FallbackAzureSpeechTranscriberLanguage = { AfZa: "af-ZA", AmEt: "am-ET", @@ -294,3 +146,5 @@ export const FallbackAzureSpeechTranscriberLanguage = { ZhTw: "zh-TW", ZuZa: "zu-ZA", } as const; +export type FallbackAzureSpeechTranscriberLanguage = + (typeof FallbackAzureSpeechTranscriberLanguage)[keyof typeof FallbackAzureSpeechTranscriberLanguage]; diff --git a/src/api/types/FallbackAzureSpeechTranscriberProvider.ts b/src/api/types/FallbackAzureSpeechTranscriberProvider.ts new file mode 100644 index 00000000..67599be7 --- /dev/null +++ b/src/api/types/FallbackAzureSpeechTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackAzureSpeechTranscriberProvider = { + Azure: "azure", +} as const; +export type FallbackAzureSpeechTranscriberProvider = + (typeof FallbackAzureSpeechTranscriberProvider)[keyof typeof FallbackAzureSpeechTranscriberProvider]; diff --git a/src/api/types/FallbackAzureSpeechTranscriberSegmentationStrategy.ts b/src/api/types/FallbackAzureSpeechTranscriberSegmentationStrategy.ts index c0545209..1a180455 100644 --- a/src/api/types/FallbackAzureSpeechTranscriberSegmentationStrategy.ts +++ b/src/api/types/FallbackAzureSpeechTranscriberSegmentationStrategy.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation. - */ -export type FallbackAzureSpeechTranscriberSegmentationStrategy = "Default" | "Time" | "Semantic"; +/** Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation. */ export const FallbackAzureSpeechTranscriberSegmentationStrategy = { Default: "Default", Time: "Time", Semantic: "Semantic", } as const; +export type FallbackAzureSpeechTranscriberSegmentationStrategy = + (typeof FallbackAzureSpeechTranscriberSegmentationStrategy)[keyof typeof FallbackAzureSpeechTranscriberSegmentationStrategy]; diff --git a/src/api/types/FallbackAzureVoice.ts b/src/api/types/FallbackAzureVoice.ts index 6ed684b6..55d31ca7 100644 --- a/src/api/types/FallbackAzureVoice.ts +++ b/src/api/types/FallbackAzureVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackAzureVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "azure"; + provider: Vapi.FallbackAzureVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.FallbackAzureVoiceId; /** This is the speed multiplier that will be used. */ diff --git a/src/api/types/FallbackAzureVoiceId.ts b/src/api/types/FallbackAzureVoiceId.ts index dd5dc5c2..fc4d7fea 100644 --- a/src/api/types/FallbackAzureVoiceId.ts +++ b/src/api/types/FallbackAzureVoiceId.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. */ -export type FallbackAzureVoiceId = Vapi.FallbackAzureVoiceVoiceId | string; +export type FallbackAzureVoiceId = Vapi.FallbackAzureVoiceVoiceIdZero | string; diff --git a/src/api/types/FallbackAzureVoiceProvider.ts b/src/api/types/FallbackAzureVoiceProvider.ts new file mode 100644 index 00000000..31ed31cd --- /dev/null +++ b/src/api/types/FallbackAzureVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackAzureVoiceProvider = { + Azure: "azure", +} as const; +export type FallbackAzureVoiceProvider = (typeof FallbackAzureVoiceProvider)[keyof typeof FallbackAzureVoiceProvider]; diff --git a/src/api/types/FallbackAzureVoiceVoiceId.ts b/src/api/types/FallbackAzureVoiceVoiceId.ts deleted file mode 100644 index d432bee9..00000000 --- a/src/api/types/FallbackAzureVoiceVoiceId.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type FallbackAzureVoiceVoiceId = "andrew" | "brian" | "emma"; -export const FallbackAzureVoiceVoiceId = { - Andrew: "andrew", - Brian: "brian", - Emma: "emma", -} as const; diff --git a/src/api/types/FallbackAzureVoiceVoiceIdZero.ts b/src/api/types/FallbackAzureVoiceVoiceIdZero.ts new file mode 100644 index 00000000..435a07f7 --- /dev/null +++ b/src/api/types/FallbackAzureVoiceVoiceIdZero.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export const FallbackAzureVoiceVoiceIdZero = { + Andrew: "andrew", + Brian: "brian", + Emma: "emma", +} as const; +export type FallbackAzureVoiceVoiceIdZero = + (typeof FallbackAzureVoiceVoiceIdZero)[keyof typeof FallbackAzureVoiceVoiceIdZero]; diff --git a/src/api/types/FallbackCartesiaTranscriber.ts b/src/api/types/FallbackCartesiaTranscriber.ts index 7979c6f9..ea0f679e 100644 --- a/src/api/types/FallbackCartesiaTranscriber.ts +++ b/src/api/types/FallbackCartesiaTranscriber.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackCartesiaTranscriber { - provider: "cartesia"; - model?: "ink-whisper"; + provider: Vapi.FallbackCartesiaTranscriberProvider; + model?: Vapi.FallbackCartesiaTranscriberModel; language?: Vapi.FallbackCartesiaTranscriberLanguage; } diff --git a/src/api/types/FallbackCartesiaTranscriberLanguage.ts b/src/api/types/FallbackCartesiaTranscriberLanguage.ts index b4ba2347..058e3259 100644 --- a/src/api/types/FallbackCartesiaTranscriberLanguage.ts +++ b/src/api/types/FallbackCartesiaTranscriberLanguage.ts @@ -1,193 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackCartesiaTranscriberLanguage = - | "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"; export const FallbackCartesiaTranscriberLanguage = { Aa: "aa", Ab: "ab", @@ -375,3 +187,5 @@ export const FallbackCartesiaTranscriberLanguage = { Zh: "zh", Zu: "zu", } as const; +export type FallbackCartesiaTranscriberLanguage = + (typeof FallbackCartesiaTranscriberLanguage)[keyof typeof FallbackCartesiaTranscriberLanguage]; diff --git a/src/api/types/FallbackCartesiaTranscriberModel.ts b/src/api/types/FallbackCartesiaTranscriberModel.ts new file mode 100644 index 00000000..f6b08d86 --- /dev/null +++ b/src/api/types/FallbackCartesiaTranscriberModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const FallbackCartesiaTranscriberModel = { + InkWhisper: "ink-whisper", +} as const; +export type FallbackCartesiaTranscriberModel = + (typeof FallbackCartesiaTranscriberModel)[keyof typeof FallbackCartesiaTranscriberModel]; diff --git a/src/api/types/FallbackCartesiaTranscriberProvider.ts b/src/api/types/FallbackCartesiaTranscriberProvider.ts new file mode 100644 index 00000000..4e231d94 --- /dev/null +++ b/src/api/types/FallbackCartesiaTranscriberProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const FallbackCartesiaTranscriberProvider = { + Cartesia: "cartesia", +} as const; +export type FallbackCartesiaTranscriberProvider = + (typeof FallbackCartesiaTranscriberProvider)[keyof typeof FallbackCartesiaTranscriberProvider]; diff --git a/src/api/types/FallbackCartesiaVoice.ts b/src/api/types/FallbackCartesiaVoice.ts index bca51440..525b1524 100644 --- a/src/api/types/FallbackCartesiaVoice.ts +++ b/src/api/types/FallbackCartesiaVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackCartesiaVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "cartesia"; + provider: Vapi.FallbackCartesiaVoiceProvider; /** The ID of the particular voice you want to use. */ voiceId: string; /** This is the model that will be used. This is optional and will default to the correct model for the voiceId. */ @@ -17,6 +15,10 @@ export interface FallbackCartesiaVoice { language?: Vapi.FallbackCartesiaVoiceLanguage; /** Experimental controls for Cartesia voice generation */ experimentalControls?: Vapi.CartesiaExperimentalControls; + /** Generation config for fine-grained control of sonic-3 voice output (speed, volume, and experimental controls). Only available for sonic-3 model. */ + generationConfig?: Vapi.CartesiaGenerationConfig; + /** Pronunciation dictionary ID for sonic-3. Allows custom pronunciations for specific words. Only available for sonic-3 model. */ + pronunciationDictId?: string; /** This is the plan for chunking the model output before it is sent to the voice provider. */ chunkPlan?: Vapi.ChunkPlan; } diff --git a/src/api/types/FallbackCartesiaVoiceLanguage.ts b/src/api/types/FallbackCartesiaVoiceLanguage.ts index a9fcba39..0ff4c251 100644 --- a/src/api/types/FallbackCartesiaVoiceLanguage.ts +++ b/src/api/types/FallbackCartesiaVoiceLanguage.ts @@ -1,40 +1,49 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the language that will be used. This is optional and will default to the correct language for the voiceId. - */ -export type FallbackCartesiaVoiceLanguage = - | "en" - | "de" - | "es" - | "fr" - | "ja" - | "pt" - | "zh" - | "hi" - | "it" - | "ko" - | "nl" - | "pl" - | "ru" - | "sv" - | "tr"; +/** This is the language that will be used. This is optional and will default to the correct language for the voiceId. */ export const FallbackCartesiaVoiceLanguage = { - En: "en", + Ar: "ar", + Bg: "bg", + Bn: "bn", + Cs: "cs", + Da: "da", De: "de", + El: "el", + En: "en", Es: "es", + Fi: "fi", Fr: "fr", - Ja: "ja", - Pt: "pt", - Zh: "zh", + Gu: "gu", + He: "he", Hi: "hi", + Hr: "hr", + Hu: "hu", + Id: "id", It: "it", + Ja: "ja", + Ka: "ka", + Kn: "kn", Ko: "ko", + Ml: "ml", + Mr: "mr", + Ms: "ms", Nl: "nl", + No: "no", + Pa: "pa", Pl: "pl", + Pt: "pt", + Ro: "ro", Ru: "ru", + Sk: "sk", Sv: "sv", + Ta: "ta", + Te: "te", + Th: "th", + Tl: "tl", Tr: "tr", + Uk: "uk", + Vi: "vi", + Zh: "zh", } as const; +export type FallbackCartesiaVoiceLanguage = + (typeof FallbackCartesiaVoiceLanguage)[keyof typeof FallbackCartesiaVoiceLanguage]; diff --git a/src/api/types/FallbackCartesiaVoiceModel.ts b/src/api/types/FallbackCartesiaVoiceModel.ts index cd720a49..4b6fecf2 100644 --- a/src/api/types/FallbackCartesiaVoiceModel.ts +++ b/src/api/types/FallbackCartesiaVoiceModel.ts @@ -1,15 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. This is optional and will default to the correct model for the voiceId. - */ -export type FallbackCartesiaVoiceModel = "sonic-2" | "sonic-english" | "sonic-multilingual" | "sonic-preview" | "sonic"; +/** This is the model that will be used. This is optional and will default to the correct model for the voiceId. */ export const FallbackCartesiaVoiceModel = { + Sonic3: "sonic-3", Sonic2: "sonic-2", SonicEnglish: "sonic-english", SonicMultilingual: "sonic-multilingual", SonicPreview: "sonic-preview", Sonic: "sonic", } as const; +export type FallbackCartesiaVoiceModel = (typeof FallbackCartesiaVoiceModel)[keyof typeof FallbackCartesiaVoiceModel]; diff --git a/src/api/types/FallbackCartesiaVoiceProvider.ts b/src/api/types/FallbackCartesiaVoiceProvider.ts new file mode 100644 index 00000000..2a0ae2e7 --- /dev/null +++ b/src/api/types/FallbackCartesiaVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackCartesiaVoiceProvider = { + Cartesia: "cartesia", +} as const; +export type FallbackCartesiaVoiceProvider = + (typeof FallbackCartesiaVoiceProvider)[keyof typeof FallbackCartesiaVoiceProvider]; diff --git a/src/api/types/FallbackCustomTranscriber.ts b/src/api/types/FallbackCustomTranscriber.ts index 56f47324..1cd43689 100644 --- a/src/api/types/FallbackCustomTranscriber.ts +++ b/src/api/types/FallbackCustomTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackCustomTranscriber { /** This is the transcription provider that will be used. Use `custom-transcriber` for providers that are not natively supported. */ - provider: "custom-transcriber"; + provider: Vapi.FallbackCustomTranscriberProvider; /** * This is where the transcription request will be sent. * diff --git a/src/api/types/FallbackCustomTranscriberProvider.ts b/src/api/types/FallbackCustomTranscriberProvider.ts new file mode 100644 index 00000000..8ae8bfe4 --- /dev/null +++ b/src/api/types/FallbackCustomTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. Use `custom-transcriber` for providers that are not natively supported. */ +export const FallbackCustomTranscriberProvider = { + CustomTranscriber: "custom-transcriber", +} as const; +export type FallbackCustomTranscriberProvider = + (typeof FallbackCustomTranscriberProvider)[keyof typeof FallbackCustomTranscriberProvider]; diff --git a/src/api/types/FallbackCustomVoice.ts b/src/api/types/FallbackCustomVoice.ts index 245705b8..197b5d55 100644 --- a/src/api/types/FallbackCustomVoice.ts +++ b/src/api/types/FallbackCustomVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackCustomVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. Use `custom-voice` for providers that are not natively supported. */ - provider: "custom-voice"; + provider: Vapi.FallbackCustomVoiceProvider; /** * This is where the voice request will be sent. * diff --git a/src/api/types/FallbackCustomVoiceProvider.ts b/src/api/types/FallbackCustomVoiceProvider.ts new file mode 100644 index 00000000..0fce3a49 --- /dev/null +++ b/src/api/types/FallbackCustomVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. Use `custom-voice` for providers that are not natively supported. */ +export const FallbackCustomVoiceProvider = { + CustomVoice: "custom-voice", +} as const; +export type FallbackCustomVoiceProvider = + (typeof FallbackCustomVoiceProvider)[keyof typeof FallbackCustomVoiceProvider]; diff --git a/src/api/types/FallbackDeepgramTranscriber.ts b/src/api/types/FallbackDeepgramTranscriber.ts index 72a4b808..746dcdd6 100644 --- a/src/api/types/FallbackDeepgramTranscriber.ts +++ b/src/api/types/FallbackDeepgramTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackDeepgramTranscriber { /** This is the transcription provider that will be used. */ - provider: "deepgram"; + provider: Vapi.FallbackDeepgramTranscriberProvider; /** 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 */ model?: Vapi.DeepgramTranscriberModel; /** 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 */ diff --git a/src/api/types/FallbackDeepgramTranscriberLanguage.ts b/src/api/types/FallbackDeepgramTranscriberLanguage.ts index 358c7ec6..9053f4aa 100644 --- a/src/api/types/FallbackDeepgramTranscriberLanguage.ts +++ b/src/api/types/FallbackDeepgramTranscriberLanguage.ts @@ -1,64 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackDeepgramTranscriberLanguage = - | "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"; export const FallbackDeepgramTranscriberLanguage = { Bg: "bg", Ca: "ca", @@ -117,3 +58,5 @@ export const FallbackDeepgramTranscriberLanguage = { ZhHant: "zh-Hant", ZhTw: "zh-TW", } as const; +export type FallbackDeepgramTranscriberLanguage = + (typeof FallbackDeepgramTranscriberLanguage)[keyof typeof FallbackDeepgramTranscriberLanguage]; diff --git a/src/api/types/FallbackDeepgramTranscriberModel.ts b/src/api/types/FallbackDeepgramTranscriberModel.ts index bbc284db..4af72c39 100644 --- a/src/api/types/FallbackDeepgramTranscriberModel.ts +++ b/src/api/types/FallbackDeepgramTranscriberModel.ts @@ -1,40 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackDeepgramTranscriberModel = - | "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"; export const FallbackDeepgramTranscriberModel = { + FluxGeneralEn: "flux-general-en", Nova3: "nova-3", Nova3General: "nova-3-general", Nova3Medical: "nova-3-medical", @@ -66,4 +33,7 @@ export const FallbackDeepgramTranscriberModel = { BaseConversationalai: "base-conversationalai", BaseVoicemail: "base-voicemail", BaseVideo: "base-video", + Whisper: "whisper", } as const; +export type FallbackDeepgramTranscriberModel = + (typeof FallbackDeepgramTranscriberModel)[keyof typeof FallbackDeepgramTranscriberModel]; diff --git a/src/api/types/FallbackDeepgramTranscriberProvider.ts b/src/api/types/FallbackDeepgramTranscriberProvider.ts new file mode 100644 index 00000000..0986cadc --- /dev/null +++ b/src/api/types/FallbackDeepgramTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackDeepgramTranscriberProvider = { + Deepgram: "deepgram", +} as const; +export type FallbackDeepgramTranscriberProvider = + (typeof FallbackDeepgramTranscriberProvider)[keyof typeof FallbackDeepgramTranscriberProvider]; diff --git a/src/api/types/FallbackDeepgramVoice.ts b/src/api/types/FallbackDeepgramVoice.ts index bf144450..6bfc4b42 100644 --- a/src/api/types/FallbackDeepgramVoice.ts +++ b/src/api/types/FallbackDeepgramVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackDeepgramVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "deepgram"; + provider: Vapi.FallbackDeepgramVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.FallbackDeepgramVoiceId; /** This is the model that will be used. Defaults to 'aura-2' when not specified. */ diff --git a/src/api/types/FallbackDeepgramVoiceId.ts b/src/api/types/FallbackDeepgramVoiceId.ts index e82d3fa2..a58635cd 100644 --- a/src/api/types/FallbackDeepgramVoiceId.ts +++ b/src/api/types/FallbackDeepgramVoiceId.ts @@ -1,66 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the provider-specific ID that will be used. - */ -export type FallbackDeepgramVoiceId = - | "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"; +/** This is the provider-specific ID that will be used. */ export const FallbackDeepgramVoiceId = { Asteria: "asteria", Luna: "luna", @@ -118,3 +58,4 @@ export const FallbackDeepgramVoiceId = { Selena: "selena", Javier: "javier", } as const; +export type FallbackDeepgramVoiceId = (typeof FallbackDeepgramVoiceId)[keyof typeof FallbackDeepgramVoiceId]; diff --git a/src/api/types/FallbackDeepgramVoiceModel.ts b/src/api/types/FallbackDeepgramVoiceModel.ts index a3e5822d..91b08a35 100644 --- a/src/api/types/FallbackDeepgramVoiceModel.ts +++ b/src/api/types/FallbackDeepgramVoiceModel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. Defaults to 'aura-2' when not specified. - */ -export type FallbackDeepgramVoiceModel = "aura" | "aura-2"; +/** This is the model that will be used. Defaults to 'aura-2' when not specified. */ export const FallbackDeepgramVoiceModel = { Aura: "aura", Aura2: "aura-2", } as const; +export type FallbackDeepgramVoiceModel = (typeof FallbackDeepgramVoiceModel)[keyof typeof FallbackDeepgramVoiceModel]; diff --git a/src/api/types/FallbackDeepgramVoiceProvider.ts b/src/api/types/FallbackDeepgramVoiceProvider.ts new file mode 100644 index 00000000..9b166482 --- /dev/null +++ b/src/api/types/FallbackDeepgramVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackDeepgramVoiceProvider = { + Deepgram: "deepgram", +} as const; +export type FallbackDeepgramVoiceProvider = + (typeof FallbackDeepgramVoiceProvider)[keyof typeof FallbackDeepgramVoiceProvider]; diff --git a/src/api/types/FallbackElevenLabsTranscriber.ts b/src/api/types/FallbackElevenLabsTranscriber.ts index efb97678..4737d118 100644 --- a/src/api/types/FallbackElevenLabsTranscriber.ts +++ b/src/api/types/FallbackElevenLabsTranscriber.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackElevenLabsTranscriber { /** This is the transcription provider that will be used. */ - provider: "11labs"; + provider: Vapi.FallbackElevenLabsTranscriberProvider; /** This is the model that will be used for the transcription. */ - model?: "scribe_v1"; + model?: Vapi.FallbackElevenLabsTranscriberModel; language?: Vapi.FallbackElevenLabsTranscriberLanguage; } diff --git a/src/api/types/FallbackElevenLabsTranscriberLanguage.ts b/src/api/types/FallbackElevenLabsTranscriberLanguage.ts index e0a7af58..2734faff 100644 --- a/src/api/types/FallbackElevenLabsTranscriberLanguage.ts +++ b/src/api/types/FallbackElevenLabsTranscriberLanguage.ts @@ -1,193 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackElevenLabsTranscriberLanguage = - | "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"; export const FallbackElevenLabsTranscriberLanguage = { Aa: "aa", Ab: "ab", @@ -375,3 +187,5 @@ export const FallbackElevenLabsTranscriberLanguage = { Zh: "zh", Zu: "zu", } as const; +export type FallbackElevenLabsTranscriberLanguage = + (typeof FallbackElevenLabsTranscriberLanguage)[keyof typeof FallbackElevenLabsTranscriberLanguage]; diff --git a/src/api/types/FallbackElevenLabsTranscriberModel.ts b/src/api/types/FallbackElevenLabsTranscriberModel.ts new file mode 100644 index 00000000..27a54289 --- /dev/null +++ b/src/api/types/FallbackElevenLabsTranscriberModel.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used for the transcription. */ +export const FallbackElevenLabsTranscriberModel = { + ScribeV1: "scribe_v1", +} as const; +export type FallbackElevenLabsTranscriberModel = + (typeof FallbackElevenLabsTranscriberModel)[keyof typeof FallbackElevenLabsTranscriberModel]; diff --git a/src/api/types/FallbackElevenLabsTranscriberProvider.ts b/src/api/types/FallbackElevenLabsTranscriberProvider.ts new file mode 100644 index 00000000..e43ddcea --- /dev/null +++ b/src/api/types/FallbackElevenLabsTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackElevenLabsTranscriberProvider = { + ElevenLabs: "11labs", +} as const; +export type FallbackElevenLabsTranscriberProvider = + (typeof FallbackElevenLabsTranscriberProvider)[keyof typeof FallbackElevenLabsTranscriberProvider]; diff --git a/src/api/types/FallbackElevenLabsVoice.ts b/src/api/types/FallbackElevenLabsVoice.ts index d41ffb8c..599b89d4 100644 --- a/src/api/types/FallbackElevenLabsVoice.ts +++ b/src/api/types/FallbackElevenLabsVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackElevenLabsVoice { /** This is the flag to toggle voice caching for the assistant. */ diff --git a/src/api/types/FallbackElevenLabsVoiceId.ts b/src/api/types/FallbackElevenLabsVoiceId.ts index 351783a3..40fc4573 100644 --- a/src/api/types/FallbackElevenLabsVoiceId.ts +++ b/src/api/types/FallbackElevenLabsVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. diff --git a/src/api/types/FallbackElevenLabsVoiceIdEnum.ts b/src/api/types/FallbackElevenLabsVoiceIdEnum.ts index bedb94fb..8197dae7 100644 --- a/src/api/types/FallbackElevenLabsVoiceIdEnum.ts +++ b/src/api/types/FallbackElevenLabsVoiceIdEnum.ts @@ -1,23 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackElevenLabsVoiceIdEnum = - | "burt" - | "marissa" - | "andrea" - | "sarah" - | "phillip" - | "steve" - | "joseph" - | "myra" - | "paula" - | "ryan" - | "drew" - | "paul" - | "mrb" - | "matilda" - | "mark"; export const FallbackElevenLabsVoiceIdEnum = { Burt: "burt", Marissa: "marissa", @@ -35,3 +17,5 @@ export const FallbackElevenLabsVoiceIdEnum = { Matilda: "matilda", Mark: "mark", } as const; +export type FallbackElevenLabsVoiceIdEnum = + (typeof FallbackElevenLabsVoiceIdEnum)[keyof typeof FallbackElevenLabsVoiceIdEnum]; diff --git a/src/api/types/FallbackElevenLabsVoiceModel.ts b/src/api/types/FallbackElevenLabsVoiceModel.ts index 4c4684b2..183507dc 100644 --- a/src/api/types/FallbackElevenLabsVoiceModel.ts +++ b/src/api/types/FallbackElevenLabsVoiceModel.ts @@ -1,17 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. Defaults to 'eleven_turbo_v2' if not specified. - */ -export type FallbackElevenLabsVoiceModel = - | "eleven_multilingual_v2" - | "eleven_turbo_v2" - | "eleven_turbo_v2_5" - | "eleven_flash_v2" - | "eleven_flash_v2_5" - | "eleven_monolingual_v1"; +/** This is the model that will be used. Defaults to 'eleven_turbo_v2' if not specified. */ export const FallbackElevenLabsVoiceModel = { ElevenMultilingualV2: "eleven_multilingual_v2", ElevenTurboV2: "eleven_turbo_v2", @@ -20,3 +9,5 @@ export const FallbackElevenLabsVoiceModel = { ElevenFlashV25: "eleven_flash_v2_5", ElevenMonolingualV1: "eleven_monolingual_v1", } as const; +export type FallbackElevenLabsVoiceModel = + (typeof FallbackElevenLabsVoiceModel)[keyof typeof FallbackElevenLabsVoiceModel]; diff --git a/src/api/types/FallbackGladiaTranscriber.ts b/src/api/types/FallbackGladiaTranscriber.ts index d914cb68..cb23f2b7 100644 --- a/src/api/types/FallbackGladiaTranscriber.ts +++ b/src/api/types/FallbackGladiaTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackGladiaTranscriber { /** This is the transcription provider that will be used. */ - provider: "gladia"; + provider: Vapi.FallbackGladiaTranscriberProvider; /** This is the Gladia model that will be used. Default is 'fast' */ model?: Vapi.FallbackGladiaTranscriberModel; /** Defines how the transcription model detects the audio language. Default value is 'automatic single language'. */ diff --git a/src/api/types/FallbackGladiaTranscriberLanguage.ts b/src/api/types/FallbackGladiaTranscriberLanguage.ts index 70aef500..3e19aebd 100644 --- a/src/api/types/FallbackGladiaTranscriberLanguage.ts +++ b/src/api/types/FallbackGladiaTranscriberLanguage.ts @@ -1,110 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. - */ -export type FallbackGladiaTranscriberLanguage = - | "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"; +/** Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. */ export const FallbackGladiaTranscriberLanguage = { Af: "af", Sq: "sq", @@ -206,3 +102,5 @@ export const FallbackGladiaTranscriberLanguage = { Yi: "yi", Yo: "yo", } as const; +export type FallbackGladiaTranscriberLanguage = + (typeof FallbackGladiaTranscriberLanguage)[keyof typeof FallbackGladiaTranscriberLanguage]; diff --git a/src/api/types/FallbackGladiaTranscriberLanguageBehaviour.ts b/src/api/types/FallbackGladiaTranscriberLanguageBehaviour.ts index 55f2ae8f..01d06538 100644 --- a/src/api/types/FallbackGladiaTranscriberLanguageBehaviour.ts +++ b/src/api/types/FallbackGladiaTranscriberLanguageBehaviour.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackGladiaTranscriberLanguageBehaviour = - | "manual" - | "automatic single language" - | "automatic multiple languages"; export const FallbackGladiaTranscriberLanguageBehaviour = { Manual: "manual", AutomaticSingleLanguage: "automatic single language", AutomaticMultipleLanguages: "automatic multiple languages", } as const; +export type FallbackGladiaTranscriberLanguageBehaviour = + (typeof FallbackGladiaTranscriberLanguageBehaviour)[keyof typeof FallbackGladiaTranscriberLanguageBehaviour]; diff --git a/src/api/types/FallbackGladiaTranscriberLanguages.ts b/src/api/types/FallbackGladiaTranscriberLanguages.ts index 24ad00fc..4006a283 100644 --- a/src/api/types/FallbackGladiaTranscriberLanguages.ts +++ b/src/api/types/FallbackGladiaTranscriberLanguages.ts @@ -1,110 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'. - */ -export type FallbackGladiaTranscriberLanguages = - | "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"; +/** Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'. */ export const FallbackGladiaTranscriberLanguages = { Af: "af", Sq: "sq", @@ -206,3 +102,5 @@ export const FallbackGladiaTranscriberLanguages = { Yi: "yi", Yo: "yo", } as const; +export type FallbackGladiaTranscriberLanguages = + (typeof FallbackGladiaTranscriberLanguages)[keyof typeof FallbackGladiaTranscriberLanguages]; diff --git a/src/api/types/FallbackGladiaTranscriberModel.ts b/src/api/types/FallbackGladiaTranscriberModel.ts index 0ea89c28..5608cea6 100644 --- a/src/api/types/FallbackGladiaTranscriberModel.ts +++ b/src/api/types/FallbackGladiaTranscriberModel.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackGladiaTranscriberModel = "fast" | "accurate" | "solaria-1"; export const FallbackGladiaTranscriberModel = { Fast: "fast", Accurate: "accurate", Solaria1: "solaria-1", } as const; +export type FallbackGladiaTranscriberModel = + (typeof FallbackGladiaTranscriberModel)[keyof typeof FallbackGladiaTranscriberModel]; diff --git a/src/api/types/FallbackGladiaTranscriberProvider.ts b/src/api/types/FallbackGladiaTranscriberProvider.ts new file mode 100644 index 00000000..2da97ff2 --- /dev/null +++ b/src/api/types/FallbackGladiaTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackGladiaTranscriberProvider = { + Gladia: "gladia", +} as const; +export type FallbackGladiaTranscriberProvider = + (typeof FallbackGladiaTranscriberProvider)[keyof typeof FallbackGladiaTranscriberProvider]; diff --git a/src/api/types/FallbackGladiaTranscriberRegion.ts b/src/api/types/FallbackGladiaTranscriberRegion.ts index 8ced160a..7c5e8e2b 100644 --- a/src/api/types/FallbackGladiaTranscriberRegion.ts +++ b/src/api/types/FallbackGladiaTranscriberRegion.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Region for processing audio (us-west or eu-west) - */ -export type FallbackGladiaTranscriberRegion = "us-west" | "eu-west"; +/** Region for processing audio (us-west or eu-west) */ export const FallbackGladiaTranscriberRegion = { UsWest: "us-west", EuWest: "eu-west", } as const; +export type FallbackGladiaTranscriberRegion = + (typeof FallbackGladiaTranscriberRegion)[keyof typeof FallbackGladiaTranscriberRegion]; diff --git a/src/api/types/FallbackGoogleTranscriber.ts b/src/api/types/FallbackGoogleTranscriber.ts index 9c1bfa38..a832b877 100644 --- a/src/api/types/FallbackGoogleTranscriber.ts +++ b/src/api/types/FallbackGoogleTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackGoogleTranscriber { /** This is the transcription provider that will be used. */ - provider: "google"; + provider: Vapi.FallbackGoogleTranscriberProvider; /** This is the model that will be used for the transcription. */ model?: Vapi.FallbackGoogleTranscriberModel; /** This is the language that will be set for the transcription. */ diff --git a/src/api/types/FallbackGoogleTranscriberLanguage.ts b/src/api/types/FallbackGoogleTranscriberLanguage.ts index 6497459e..32386ca3 100644 --- a/src/api/types/FallbackGoogleTranscriberLanguage.ts +++ b/src/api/types/FallbackGoogleTranscriberLanguage.ts @@ -1,50 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the language that will be set for the transcription. - */ -export type FallbackGoogleTranscriberLanguage = - | "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"; +/** This is the language that will be set for the transcription. */ export const FallbackGoogleTranscriberLanguage = { Multilingual: "Multilingual", Arabic: "Arabic", @@ -86,3 +42,5 @@ export const FallbackGoogleTranscriberLanguage = { Ukrainian: "Ukrainian", Vietnamese: "Vietnamese", } as const; +export type FallbackGoogleTranscriberLanguage = + (typeof FallbackGoogleTranscriberLanguage)[keyof typeof FallbackGoogleTranscriberLanguage]; diff --git a/src/api/types/FallbackGoogleTranscriberModel.ts b/src/api/types/FallbackGoogleTranscriberModel.ts index 90c515a8..c347ebd3 100644 --- a/src/api/types/FallbackGoogleTranscriberModel.ts +++ b/src/api/types/FallbackGoogleTranscriberModel.ts @@ -1,25 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used for the transcription. - */ -export type FallbackGoogleTranscriberModel = - | "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"; +/** This is the model that will be used for the transcription. */ export const FallbackGoogleTranscriberModel = { Gemini25Pro: "gemini-2.5-pro", Gemini25Flash: "gemini-2.5-flash", @@ -36,3 +17,5 @@ export const FallbackGoogleTranscriberModel = { Gemini15Pro002: "gemini-1.5-pro-002", Gemini10Pro: "gemini-1.0-pro", } as const; +export type FallbackGoogleTranscriberModel = + (typeof FallbackGoogleTranscriberModel)[keyof typeof FallbackGoogleTranscriberModel]; diff --git a/src/api/types/FallbackGoogleTranscriberProvider.ts b/src/api/types/FallbackGoogleTranscriberProvider.ts new file mode 100644 index 00000000..f43a495c --- /dev/null +++ b/src/api/types/FallbackGoogleTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackGoogleTranscriberProvider = { + Google: "google", +} as const; +export type FallbackGoogleTranscriberProvider = + (typeof FallbackGoogleTranscriberProvider)[keyof typeof FallbackGoogleTranscriberProvider]; diff --git a/src/api/types/FallbackHumeVoice.ts b/src/api/types/FallbackHumeVoice.ts index bef8f49d..3f805b68 100644 --- a/src/api/types/FallbackHumeVoice.ts +++ b/src/api/types/FallbackHumeVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackHumeVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "hume"; + provider: Vapi.FallbackHumeVoiceProvider; /** This is the model that will be used. */ model?: Vapi.FallbackHumeVoiceModel; /** The ID of the particular voice you want to use. */ diff --git a/src/api/types/FallbackHumeVoiceModel.ts b/src/api/types/FallbackHumeVoiceModel.ts index c589dd15..e3bee2fc 100644 --- a/src/api/types/FallbackHumeVoiceModel.ts +++ b/src/api/types/FallbackHumeVoiceModel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. - */ -export type FallbackHumeVoiceModel = "octave" | "octave2"; +/** This is the model that will be used. */ export const FallbackHumeVoiceModel = { Octave: "octave", Octave2: "octave2", } as const; +export type FallbackHumeVoiceModel = (typeof FallbackHumeVoiceModel)[keyof typeof FallbackHumeVoiceModel]; diff --git a/src/api/types/FallbackHumeVoiceProvider.ts b/src/api/types/FallbackHumeVoiceProvider.ts new file mode 100644 index 00000000..d90e5603 --- /dev/null +++ b/src/api/types/FallbackHumeVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackHumeVoiceProvider = { + Hume: "hume", +} as const; +export type FallbackHumeVoiceProvider = (typeof FallbackHumeVoiceProvider)[keyof typeof FallbackHumeVoiceProvider]; diff --git a/src/api/types/FallbackInworldVoice.ts b/src/api/types/FallbackInworldVoice.ts index ce251273..00835388 100644 --- a/src/api/types/FallbackInworldVoice.ts +++ b/src/api/types/FallbackInworldVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackInworldVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "inworld"; + provider: Vapi.FallbackInworldVoiceProvider; /** * Available voices by language: * • en: Alex, Ashley, Craig, Deborah, Dennis, Edward, Elizabeth, Hades, Julia, Pixie, Mark, Olivia, Priya, Ronald, Sarah, Shaun, Theodore, Timothy, Wendy, Dominus @@ -25,7 +23,7 @@ export interface FallbackInworldVoice { */ voiceId: Vapi.FallbackInworldVoiceVoiceId; /** This is the model that will be used. */ - model?: "inworld-tts-1"; + model?: Vapi.FallbackInworldVoiceModel; /** Language code for Inworld TTS synthesis */ languageCode?: Vapi.FallbackInworldVoiceLanguageCode; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/FallbackInworldVoiceLanguageCode.ts b/src/api/types/FallbackInworldVoiceLanguageCode.ts index 56ed52bb..9273c5a9 100644 --- a/src/api/types/FallbackInworldVoiceLanguageCode.ts +++ b/src/api/types/FallbackInworldVoiceLanguageCode.ts @@ -1,22 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Language code for Inworld TTS synthesis - */ -export type FallbackInworldVoiceLanguageCode = - | "en" - | "zh" - | "ko" - | "nl" - | "fr" - | "es" - | "ja" - | "de" - | "it" - | "pl" - | "pt"; +/** Language code for Inworld TTS synthesis */ export const FallbackInworldVoiceLanguageCode = { En: "en", Zh: "zh", @@ -30,3 +14,5 @@ export const FallbackInworldVoiceLanguageCode = { Pl: "pl", Pt: "pt", } as const; +export type FallbackInworldVoiceLanguageCode = + (typeof FallbackInworldVoiceLanguageCode)[keyof typeof FallbackInworldVoiceLanguageCode]; diff --git a/src/api/types/FallbackInworldVoiceModel.ts b/src/api/types/FallbackInworldVoiceModel.ts new file mode 100644 index 00000000..841eb449 --- /dev/null +++ b/src/api/types/FallbackInworldVoiceModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used. */ +export const FallbackInworldVoiceModel = { + InworldTts1: "inworld-tts-1", +} as const; +export type FallbackInworldVoiceModel = (typeof FallbackInworldVoiceModel)[keyof typeof FallbackInworldVoiceModel]; diff --git a/src/api/types/FallbackInworldVoiceProvider.ts b/src/api/types/FallbackInworldVoiceProvider.ts new file mode 100644 index 00000000..8e71ca30 --- /dev/null +++ b/src/api/types/FallbackInworldVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackInworldVoiceProvider = { + Inworld: "inworld", +} as const; +export type FallbackInworldVoiceProvider = + (typeof FallbackInworldVoiceProvider)[keyof typeof FallbackInworldVoiceProvider]; diff --git a/src/api/types/FallbackInworldVoiceVoiceId.ts b/src/api/types/FallbackInworldVoiceVoiceId.ts index 9a16b5ef..aeeac3b2 100644 --- a/src/api/types/FallbackInworldVoiceVoiceId.ts +++ b/src/api/types/FallbackInworldVoiceVoiceId.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Available voices by language: @@ -16,57 +14,6 @@ * • pt: Heitor, Maitê * • es: Diego, Lupita, Miguel, Rafael */ -export type FallbackInworldVoiceVoiceId = - | "Alex" - | "Ashley" - | "Craig" - | "Deborah" - | "Dennis" - | "Edward" - | "Elizabeth" - | "Hades" - | "Julia" - | "Pixie" - | "Mark" - | "Olivia" - | "Priya" - | "Ronald" - | "Sarah" - | "Shaun" - | "Theodore" - | "Timothy" - | "Wendy" - | "Dominus" - | "Yichen" - | "Xiaoyin" - | "Xinyi" - | "Jing" - | "Erik" - | "Katrien" - | "Lennart" - | "Lore" - | "Alain" - | "H\u00E9l\u00E8ne" - | "Mathieu" - | "\u00C9tienne" - | "Johanna" - | "Josef" - | "Gianni" - | "Orietta" - | "Asuka" - | "Satoshi" - | "Hyunwoo" - | "Minji" - | "Seojun" - | "Yoona" - | "Szymon" - | "Wojciech" - | "Heitor" - | "Mait\u00EA" - | "Diego" - | "Lupita" - | "Miguel" - | "Rafael"; export const FallbackInworldVoiceVoiceId = { Alex: "Alex", Ashley: "Ashley", @@ -119,3 +66,5 @@ export const FallbackInworldVoiceVoiceId = { Miguel: "Miguel", Rafael: "Rafael", } as const; +export type FallbackInworldVoiceVoiceId = + (typeof FallbackInworldVoiceVoiceId)[keyof typeof FallbackInworldVoiceVoiceId]; diff --git a/src/api/types/FallbackLmntVoice.ts b/src/api/types/FallbackLmntVoice.ts index 70aec505..2317b3d4 100644 --- a/src/api/types/FallbackLmntVoice.ts +++ b/src/api/types/FallbackLmntVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackLmntVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "lmnt"; + provider: Vapi.FallbackLmntVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.FallbackLmntVoiceId; /** This is the speed multiplier that will be used. */ diff --git a/src/api/types/FallbackLmntVoiceId.ts b/src/api/types/FallbackLmntVoiceId.ts index 7105bd46..f0dfaee4 100644 --- a/src/api/types/FallbackLmntVoiceId.ts +++ b/src/api/types/FallbackLmntVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/FallbackLmntVoiceIdEnum.ts b/src/api/types/FallbackLmntVoiceIdEnum.ts index 157aad83..4a224845 100644 --- a/src/api/types/FallbackLmntVoiceIdEnum.ts +++ b/src/api/types/FallbackLmntVoiceIdEnum.ts @@ -1,50 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackLmntVoiceIdEnum = - | "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"; export const FallbackLmntVoiceIdEnum = { Amy: "amy", Ansel: "ansel", @@ -89,3 +44,4 @@ export const FallbackLmntVoiceIdEnum = { Zeke: "zeke", Zoe: "zoe", } as const; +export type FallbackLmntVoiceIdEnum = (typeof FallbackLmntVoiceIdEnum)[keyof typeof FallbackLmntVoiceIdEnum]; diff --git a/src/api/types/FallbackLmntVoiceLanguage.ts b/src/api/types/FallbackLmntVoiceLanguage.ts index 00c8fd7a..9e661933 100644 --- a/src/api/types/FallbackLmntVoiceLanguage.ts +++ b/src/api/types/FallbackLmntVoiceLanguage.ts @@ -1,197 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Two letter ISO 639-1 language code. Use "auto" for auto-detection. - */ -export type FallbackLmntVoiceLanguage = - | "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"; +/** Two letter ISO 639-1 language code. Use "auto" for auto-detection. */ export const FallbackLmntVoiceLanguage = { Aa: "aa", Ab: "ab", @@ -380,3 +189,4 @@ export const FallbackLmntVoiceLanguage = { Zu: "zu", Auto: "auto", } as const; +export type FallbackLmntVoiceLanguage = (typeof FallbackLmntVoiceLanguage)[keyof typeof FallbackLmntVoiceLanguage]; diff --git a/src/api/types/FallbackLmntVoiceProvider.ts b/src/api/types/FallbackLmntVoiceProvider.ts new file mode 100644 index 00000000..60483819 --- /dev/null +++ b/src/api/types/FallbackLmntVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackLmntVoiceProvider = { + Lmnt: "lmnt", +} as const; +export type FallbackLmntVoiceProvider = (typeof FallbackLmntVoiceProvider)[keyof typeof FallbackLmntVoiceProvider]; diff --git a/src/api/types/FallbackMinimaxVoice.ts b/src/api/types/FallbackMinimaxVoice.ts index 08451358..aa9bbdc1 100644 --- a/src/api/types/FallbackMinimaxVoice.ts +++ b/src/api/types/FallbackMinimaxVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackMinimaxVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "minimax"; + provider: Vapi.FallbackMinimaxVoiceProvider; /** This is the provider-specific ID that will be used. Use a voice from MINIMAX_PREDEFINED_VOICES or a custom cloned voice ID. */ voiceId: string; /** diff --git a/src/api/types/FallbackMinimaxVoiceLanguageBoost.ts b/src/api/types/FallbackMinimaxVoiceLanguageBoost.ts index bf50cfc5..f80c077f 100644 --- a/src/api/types/FallbackMinimaxVoiceLanguageBoost.ts +++ b/src/api/types/FallbackMinimaxVoiceLanguageBoost.ts @@ -1,52 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English). - */ -export type FallbackMinimaxVoiceLanguageBoost = - | "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"; +/** Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English). */ export const FallbackMinimaxVoiceLanguageBoost = { Chinese: "Chinese", ChineseYue: "Chinese,Yue", @@ -90,3 +44,5 @@ export const FallbackMinimaxVoiceLanguageBoost = { Afrikaans: "Afrikaans", Auto: "auto", } as const; +export type FallbackMinimaxVoiceLanguageBoost = + (typeof FallbackMinimaxVoiceLanguageBoost)[keyof typeof FallbackMinimaxVoiceLanguageBoost]; diff --git a/src/api/types/FallbackMinimaxVoiceModel.ts b/src/api/types/FallbackMinimaxVoiceModel.ts index 8421a0c0..9bbeae0f 100644 --- a/src/api/types/FallbackMinimaxVoiceModel.ts +++ b/src/api/types/FallbackMinimaxVoiceModel.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the model that will be used. Options are 'speech-02-hd' and 'speech-02-turbo'. @@ -9,9 +7,9 @@ * * @default "speech-02-turbo" */ -export type FallbackMinimaxVoiceModel = "speech-02-hd" | "speech-02-turbo" | "speech-2.5-turbo-preview"; export const FallbackMinimaxVoiceModel = { Speech02Hd: "speech-02-hd", Speech02Turbo: "speech-02-turbo", Speech25TurboPreview: "speech-2.5-turbo-preview", } as const; +export type FallbackMinimaxVoiceModel = (typeof FallbackMinimaxVoiceModel)[keyof typeof FallbackMinimaxVoiceModel]; diff --git a/src/api/types/FallbackMinimaxVoiceProvider.ts b/src/api/types/FallbackMinimaxVoiceProvider.ts new file mode 100644 index 00000000..cc3e560a --- /dev/null +++ b/src/api/types/FallbackMinimaxVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackMinimaxVoiceProvider = { + Minimax: "minimax", +} as const; +export type FallbackMinimaxVoiceProvider = + (typeof FallbackMinimaxVoiceProvider)[keyof typeof FallbackMinimaxVoiceProvider]; diff --git a/src/api/types/FallbackMinimaxVoiceRegion.ts b/src/api/types/FallbackMinimaxVoiceRegion.ts index 4f52526a..3b61316d 100644 --- a/src/api/types/FallbackMinimaxVoiceRegion.ts +++ b/src/api/types/FallbackMinimaxVoiceRegion.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The region for Minimax API. Defaults to "worldwide". - */ -export type FallbackMinimaxVoiceRegion = "worldwide" | "china"; +/** The region for Minimax API. Defaults to "worldwide". */ export const FallbackMinimaxVoiceRegion = { Worldwide: "worldwide", China: "china", } as const; +export type FallbackMinimaxVoiceRegion = (typeof FallbackMinimaxVoiceRegion)[keyof typeof FallbackMinimaxVoiceRegion]; diff --git a/src/api/types/FallbackNeetsVoice.ts b/src/api/types/FallbackNeetsVoice.ts index 9cd6ff1b..65df41c5 100644 --- a/src/api/types/FallbackNeetsVoice.ts +++ b/src/api/types/FallbackNeetsVoice.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FallbackNeetsVoice { voiceId?: unknown; diff --git a/src/api/types/FallbackNeuphonicVoice.ts b/src/api/types/FallbackNeuphonicVoice.ts index ec81493c..e44a228a 100644 --- a/src/api/types/FallbackNeuphonicVoice.ts +++ b/src/api/types/FallbackNeuphonicVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackNeuphonicVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "neuphonic"; + provider: Vapi.FallbackNeuphonicVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: string; /** This is the model that will be used. Defaults to 'neu_fast' if not specified. */ diff --git a/src/api/types/FallbackNeuphonicVoiceModel.ts b/src/api/types/FallbackNeuphonicVoiceModel.ts index a2c40da7..6ffd6186 100644 --- a/src/api/types/FallbackNeuphonicVoiceModel.ts +++ b/src/api/types/FallbackNeuphonicVoiceModel.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. Defaults to 'neu_fast' if not specified. - */ -export type FallbackNeuphonicVoiceModel = "neu_hq" | "neu_fast"; +/** This is the model that will be used. Defaults to 'neu_fast' if not specified. */ export const FallbackNeuphonicVoiceModel = { NeuHq: "neu_hq", NeuFast: "neu_fast", } as const; +export type FallbackNeuphonicVoiceModel = + (typeof FallbackNeuphonicVoiceModel)[keyof typeof FallbackNeuphonicVoiceModel]; diff --git a/src/api/types/FallbackNeuphonicVoiceProvider.ts b/src/api/types/FallbackNeuphonicVoiceProvider.ts new file mode 100644 index 00000000..c9197230 --- /dev/null +++ b/src/api/types/FallbackNeuphonicVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackNeuphonicVoiceProvider = { + Neuphonic: "neuphonic", +} as const; +export type FallbackNeuphonicVoiceProvider = + (typeof FallbackNeuphonicVoiceProvider)[keyof typeof FallbackNeuphonicVoiceProvider]; diff --git a/src/api/types/FallbackOpenAiTranscriber.ts b/src/api/types/FallbackOpenAiTranscriber.ts index 30f303a3..b55d4583 100644 --- a/src/api/types/FallbackOpenAiTranscriber.ts +++ b/src/api/types/FallbackOpenAiTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackOpenAiTranscriber { /** This is the transcription provider that will be used. */ - provider: "openai"; + provider: Vapi.FallbackOpenAiTranscriberProvider; /** This is the model that will be used for the transcription. */ model: Vapi.FallbackOpenAiTranscriberModel; /** This is the language that will be set for the transcription. */ diff --git a/src/api/types/FallbackOpenAiTranscriberLanguage.ts b/src/api/types/FallbackOpenAiTranscriberLanguage.ts index a7d78d3c..d7c6f17e 100644 --- a/src/api/types/FallbackOpenAiTranscriberLanguage.ts +++ b/src/api/types/FallbackOpenAiTranscriberLanguage.ts @@ -1,68 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the language that will be set for the transcription. - */ -export type FallbackOpenAiTranscriberLanguage = - | "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"; +/** This is the language that will be set for the transcription. */ export const FallbackOpenAiTranscriberLanguage = { Af: "af", Ar: "ar", @@ -122,3 +60,5 @@ export const FallbackOpenAiTranscriberLanguage = { Vi: "vi", Cy: "cy", } as const; +export type FallbackOpenAiTranscriberLanguage = + (typeof FallbackOpenAiTranscriberLanguage)[keyof typeof FallbackOpenAiTranscriberLanguage]; diff --git a/src/api/types/FallbackOpenAiTranscriberModel.ts b/src/api/types/FallbackOpenAiTranscriberModel.ts index f3e9bd51..ec23d6b3 100644 --- a/src/api/types/FallbackOpenAiTranscriberModel.ts +++ b/src/api/types/FallbackOpenAiTranscriberModel.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used for the transcription. - */ -export type FallbackOpenAiTranscriberModel = "gpt-4o-transcribe" | "gpt-4o-mini-transcribe"; +/** This is the model that will be used for the transcription. */ export const FallbackOpenAiTranscriberModel = { Gpt4OTranscribe: "gpt-4o-transcribe", Gpt4OMiniTranscribe: "gpt-4o-mini-transcribe", } as const; +export type FallbackOpenAiTranscriberModel = + (typeof FallbackOpenAiTranscriberModel)[keyof typeof FallbackOpenAiTranscriberModel]; diff --git a/src/api/types/FallbackOpenAiTranscriberProvider.ts b/src/api/types/FallbackOpenAiTranscriberProvider.ts new file mode 100644 index 00000000..a6c58b5b --- /dev/null +++ b/src/api/types/FallbackOpenAiTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackOpenAiTranscriberProvider = { + Openai: "openai", +} as const; +export type FallbackOpenAiTranscriberProvider = + (typeof FallbackOpenAiTranscriberProvider)[keyof typeof FallbackOpenAiTranscriberProvider]; diff --git a/src/api/types/FallbackOpenAiVoice.ts b/src/api/types/FallbackOpenAiVoice.ts index 9978386c..dabaef9b 100644 --- a/src/api/types/FallbackOpenAiVoice.ts +++ b/src/api/types/FallbackOpenAiVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackOpenAiVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "openai"; + provider: Vapi.FallbackOpenAiVoiceProvider; /** * This is the provider-specific ID that will be used. * Please note that ash, ballad, coral, sage, and verse may only be used with realtime models. diff --git a/src/api/types/FallbackOpenAiVoiceId.ts b/src/api/types/FallbackOpenAiVoiceId.ts index 4e4d35b2..a324e236 100644 --- a/src/api/types/FallbackOpenAiVoiceId.ts +++ b/src/api/types/FallbackOpenAiVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/FallbackOpenAiVoiceIdEnum.ts b/src/api/types/FallbackOpenAiVoiceIdEnum.ts index 66e5bc30..66222d82 100644 --- a/src/api/types/FallbackOpenAiVoiceIdEnum.ts +++ b/src/api/types/FallbackOpenAiVoiceIdEnum.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackOpenAiVoiceIdEnum = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer" | "marin" | "cedar"; export const FallbackOpenAiVoiceIdEnum = { Alloy: "alloy", Echo: "echo", @@ -13,3 +10,4 @@ export const FallbackOpenAiVoiceIdEnum = { Marin: "marin", Cedar: "cedar", } as const; +export type FallbackOpenAiVoiceIdEnum = (typeof FallbackOpenAiVoiceIdEnum)[keyof typeof FallbackOpenAiVoiceIdEnum]; diff --git a/src/api/types/FallbackOpenAiVoiceModel.ts b/src/api/types/FallbackOpenAiVoiceModel.ts index 8713e91e..7bf1062f 100644 --- a/src/api/types/FallbackOpenAiVoiceModel.ts +++ b/src/api/types/FallbackOpenAiVoiceModel.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used for text-to-speech. - */ -export type FallbackOpenAiVoiceModel = "tts-1" | "tts-1-hd" | "gpt-4o-mini-tts"; +/** This is the model that will be used for text-to-speech. */ export const FallbackOpenAiVoiceModel = { Tts1: "tts-1", Tts1Hd: "tts-1-hd", Gpt4OMiniTts: "gpt-4o-mini-tts", } as const; +export type FallbackOpenAiVoiceModel = (typeof FallbackOpenAiVoiceModel)[keyof typeof FallbackOpenAiVoiceModel]; diff --git a/src/api/types/FallbackOpenAiVoiceProvider.ts b/src/api/types/FallbackOpenAiVoiceProvider.ts new file mode 100644 index 00000000..f6085c66 --- /dev/null +++ b/src/api/types/FallbackOpenAiVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackOpenAiVoiceProvider = { + Openai: "openai", +} as const; +export type FallbackOpenAiVoiceProvider = + (typeof FallbackOpenAiVoiceProvider)[keyof typeof FallbackOpenAiVoiceProvider]; diff --git a/src/api/types/FallbackPlan.ts b/src/api/types/FallbackPlan.ts index e04ade50..0797b4a0 100644 --- a/src/api/types/FallbackPlan.ts +++ b/src/api/types/FallbackPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackPlan { /** This is the list of voices to fallback to in the event that the primary voice provider fails. */ diff --git a/src/api/types/FallbackPlanVoicesItem.ts b/src/api/types/FallbackPlanVoicesItem.ts index 69c9dac0..75ca85b7 100644 --- a/src/api/types/FallbackPlanVoicesItem.ts +++ b/src/api/types/FallbackPlanVoicesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type FallbackPlanVoicesItem = | Vapi.FallbackAzureVoice diff --git a/src/api/types/FallbackPlayHtVoice.ts b/src/api/types/FallbackPlayHtVoice.ts index afbd1bbe..7955c0f1 100644 --- a/src/api/types/FallbackPlayHtVoice.ts +++ b/src/api/types/FallbackPlayHtVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackPlayHtVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "playht"; + provider: Vapi.FallbackPlayHtVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.FallbackPlayHtVoiceId; /** This is the speed multiplier that will be used. */ diff --git a/src/api/types/FallbackPlayHtVoiceEmotion.ts b/src/api/types/FallbackPlayHtVoiceEmotion.ts index e70e5bab..3a573551 100644 --- a/src/api/types/FallbackPlayHtVoiceEmotion.ts +++ b/src/api/types/FallbackPlayHtVoiceEmotion.ts @@ -1,23 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * An emotion to be applied to the speech. - */ -export type FallbackPlayHtVoiceEmotion = - | "female_happy" - | "female_sad" - | "female_angry" - | "female_fearful" - | "female_disgust" - | "female_surprised" - | "male_happy" - | "male_sad" - | "male_angry" - | "male_fearful" - | "male_disgust" - | "male_surprised"; +/** An emotion to be applied to the speech. */ export const FallbackPlayHtVoiceEmotion = { FemaleHappy: "female_happy", FemaleSad: "female_sad", @@ -32,3 +15,4 @@ export const FallbackPlayHtVoiceEmotion = { MaleDisgust: "male_disgust", MaleSurprised: "male_surprised", } as const; +export type FallbackPlayHtVoiceEmotion = (typeof FallbackPlayHtVoiceEmotion)[keyof typeof FallbackPlayHtVoiceEmotion]; diff --git a/src/api/types/FallbackPlayHtVoiceId.ts b/src/api/types/FallbackPlayHtVoiceId.ts index a23db31c..c4d0b9d3 100644 --- a/src/api/types/FallbackPlayHtVoiceId.ts +++ b/src/api/types/FallbackPlayHtVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/FallbackPlayHtVoiceIdEnum.ts b/src/api/types/FallbackPlayHtVoiceIdEnum.ts index 721aa965..fd1d7817 100644 --- a/src/api/types/FallbackPlayHtVoiceIdEnum.ts +++ b/src/api/types/FallbackPlayHtVoiceIdEnum.ts @@ -1,18 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackPlayHtVoiceIdEnum = - | "jennifer" - | "melissa" - | "will" - | "chris" - | "matt" - | "jack" - | "ruby" - | "davis" - | "donna" - | "michael"; export const FallbackPlayHtVoiceIdEnum = { Jennifer: "jennifer", Melissa: "melissa", @@ -25,3 +12,4 @@ export const FallbackPlayHtVoiceIdEnum = { Donna: "donna", Michael: "michael", } as const; +export type FallbackPlayHtVoiceIdEnum = (typeof FallbackPlayHtVoiceIdEnum)[keyof typeof FallbackPlayHtVoiceIdEnum]; diff --git a/src/api/types/FallbackPlayHtVoiceLanguage.ts b/src/api/types/FallbackPlayHtVoiceLanguage.ts index de28a264..be48f4e6 100644 --- a/src/api/types/FallbackPlayHtVoiceLanguage.ts +++ b/src/api/types/FallbackPlayHtVoiceLanguage.ts @@ -1,48 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The language to use for the speech. - */ -export type FallbackPlayHtVoiceLanguage = - | "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"; +/** The language to use for the speech. */ export const FallbackPlayHtVoiceLanguage = { Afrikaans: "afrikaans", Albanian: "albanian", @@ -82,3 +40,5 @@ export const FallbackPlayHtVoiceLanguage = { Urdu: "urdu", Xhosa: "xhosa", } as const; +export type FallbackPlayHtVoiceLanguage = + (typeof FallbackPlayHtVoiceLanguage)[keyof typeof FallbackPlayHtVoiceLanguage]; diff --git a/src/api/types/FallbackPlayHtVoiceModel.ts b/src/api/types/FallbackPlayHtVoiceModel.ts index e0018c4e..951dbdb0 100644 --- a/src/api/types/FallbackPlayHtVoiceModel.ts +++ b/src/api/types/FallbackPlayHtVoiceModel.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Playht voice model/engine to use. - */ -export type FallbackPlayHtVoiceModel = "PlayHT2.0" | "PlayHT2.0-turbo" | "Play3.0-mini" | "PlayDialog"; +/** Playht voice model/engine to use. */ export const FallbackPlayHtVoiceModel = { PlayHt20: "PlayHT2.0", PlayHt20Turbo: "PlayHT2.0-turbo", Play30Mini: "Play3.0-mini", PlayDialog: "PlayDialog", } as const; +export type FallbackPlayHtVoiceModel = (typeof FallbackPlayHtVoiceModel)[keyof typeof FallbackPlayHtVoiceModel]; diff --git a/src/api/types/FallbackPlayHtVoiceProvider.ts b/src/api/types/FallbackPlayHtVoiceProvider.ts new file mode 100644 index 00000000..1adea869 --- /dev/null +++ b/src/api/types/FallbackPlayHtVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackPlayHtVoiceProvider = { + Playht: "playht", +} as const; +export type FallbackPlayHtVoiceProvider = + (typeof FallbackPlayHtVoiceProvider)[keyof typeof FallbackPlayHtVoiceProvider]; diff --git a/src/api/types/FallbackRimeAiVoice.ts b/src/api/types/FallbackRimeAiVoice.ts index beeb95cd..2b7ddf55 100644 --- a/src/api/types/FallbackRimeAiVoice.ts +++ b/src/api/types/FallbackRimeAiVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackRimeAiVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "rime-ai"; + provider: Vapi.FallbackRimeAiVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.FallbackRimeAiVoiceId; /** This is the model that will be used. Defaults to 'arcana' when not specified. */ diff --git a/src/api/types/FallbackRimeAiVoiceId.ts b/src/api/types/FallbackRimeAiVoiceId.ts index 6daac420..3a19192b 100644 --- a/src/api/types/FallbackRimeAiVoiceId.ts +++ b/src/api/types/FallbackRimeAiVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/FallbackRimeAiVoiceIdEnum.ts b/src/api/types/FallbackRimeAiVoiceIdEnum.ts index 62f3e89d..65bc3190 100644 --- a/src/api/types/FallbackRimeAiVoiceIdEnum.ts +++ b/src/api/types/FallbackRimeAiVoiceIdEnum.ts @@ -1,99 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackRimeAiVoiceIdEnum = - | "abbie" - | "allison" - | "ally" - | "alona" - | "amber" - | "ana" - | "antoine" - | "armon" - | "brenda" - | "brittany" - | "carol" - | "colin" - | "courtney" - | "elena" - | "elliot" - | "eva" - | "geoff" - | "gerald" - | "hank" - | "helen" - | "hera" - | "jen" - | "joe" - | "joy" - | "juan" - | "kendra" - | "kendrick" - | "kenneth" - | "kevin" - | "kris" - | "linda" - | "madison" - | "marge" - | "marina" - | "marissa" - | "marta" - | "maya" - | "nicholas" - | "nyles" - | "phil" - | "reba" - | "rex" - | "rick" - | "ritu" - | "rob" - | "rodney" - | "rohan" - | "rosco" - | "samantha" - | "sandy" - | "selena" - | "seth" - | "sharon" - | "stan" - | "tamra" - | "tanya" - | "tibur" - | "tj" - | "tyler" - | "viv" - | "yadira" - | "marsh" - | "bayou" - | "creek" - | "brook" - | "flower" - | "spore" - | "glacier" - | "gulch" - | "alpine" - | "cove" - | "lagoon" - | "tundra" - | "steppe" - | "mesa" - | "grove" - | "rainforest" - | "moraine" - | "wildflower" - | "peak" - | "boulder" - | "gypsum" - | "zest" - | "luna" - | "celeste" - | "orion" - | "ursa" - | "astra" - | "esther" - | "estelle" - | "andromeda"; export const FallbackRimeAiVoiceIdEnum = { Abbie: "abbie", Allison: "allison", @@ -187,3 +93,4 @@ export const FallbackRimeAiVoiceIdEnum = { Estelle: "estelle", Andromeda: "andromeda", } as const; +export type FallbackRimeAiVoiceIdEnum = (typeof FallbackRimeAiVoiceIdEnum)[keyof typeof FallbackRimeAiVoiceIdEnum]; diff --git a/src/api/types/FallbackRimeAiVoiceModel.ts b/src/api/types/FallbackRimeAiVoiceModel.ts index 6a47d0ed..f2e70d56 100644 --- a/src/api/types/FallbackRimeAiVoiceModel.ts +++ b/src/api/types/FallbackRimeAiVoiceModel.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. Defaults to 'arcana' when not specified. - */ -export type FallbackRimeAiVoiceModel = "arcana" | "mistv2" | "mist"; +/** This is the model that will be used. Defaults to 'arcana' when not specified. */ export const FallbackRimeAiVoiceModel = { Arcana: "arcana", Mistv2: "mistv2", Mist: "mist", } as const; +export type FallbackRimeAiVoiceModel = (typeof FallbackRimeAiVoiceModel)[keyof typeof FallbackRimeAiVoiceModel]; diff --git a/src/api/types/FallbackRimeAiVoiceProvider.ts b/src/api/types/FallbackRimeAiVoiceProvider.ts new file mode 100644 index 00000000..ec2ac68f --- /dev/null +++ b/src/api/types/FallbackRimeAiVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackRimeAiVoiceProvider = { + RimeAi: "rime-ai", +} as const; +export type FallbackRimeAiVoiceProvider = + (typeof FallbackRimeAiVoiceProvider)[keyof typeof FallbackRimeAiVoiceProvider]; diff --git a/src/api/types/FallbackSesameVoice.ts b/src/api/types/FallbackSesameVoice.ts index d93752db..b7d7d81e 100644 --- a/src/api/types/FallbackSesameVoice.ts +++ b/src/api/types/FallbackSesameVoice.ts @@ -1,18 +1,16 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackSesameVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "sesame"; + provider: Vapi.FallbackSesameVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: string; /** This is the model that will be used. */ - model: "csm-1b"; + model: Vapi.FallbackSesameVoiceModel; /** This is the plan for chunking the model output before it is sent to the voice provider. */ chunkPlan?: Vapi.ChunkPlan; } diff --git a/src/api/types/FallbackSesameVoiceModel.ts b/src/api/types/FallbackSesameVoiceModel.ts new file mode 100644 index 00000000..6f8b73d3 --- /dev/null +++ b/src/api/types/FallbackSesameVoiceModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used. */ +export const FallbackSesameVoiceModel = { + Csm1B: "csm-1b", +} as const; +export type FallbackSesameVoiceModel = (typeof FallbackSesameVoiceModel)[keyof typeof FallbackSesameVoiceModel]; diff --git a/src/api/types/FallbackSesameVoiceProvider.ts b/src/api/types/FallbackSesameVoiceProvider.ts new file mode 100644 index 00000000..9905543d --- /dev/null +++ b/src/api/types/FallbackSesameVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackSesameVoiceProvider = { + Sesame: "sesame", +} as const; +export type FallbackSesameVoiceProvider = + (typeof FallbackSesameVoiceProvider)[keyof typeof FallbackSesameVoiceProvider]; diff --git a/src/api/types/FallbackSmallestAiVoice.ts b/src/api/types/FallbackSmallestAiVoice.ts index d9c5e077..e293688a 100644 --- a/src/api/types/FallbackSmallestAiVoice.ts +++ b/src/api/types/FallbackSmallestAiVoice.ts @@ -1,18 +1,16 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackSmallestAiVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "smallest-ai"; + provider: Vapi.FallbackSmallestAiVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.FallbackSmallestAiVoiceId; /** Smallest AI voice model to use. Defaults to 'lightning' when not specified. */ - model?: "lightning"; + model?: Vapi.FallbackSmallestAiVoiceModel; /** This is the speed multiplier that will be used. */ speed?: number; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/FallbackSmallestAiVoiceId.ts b/src/api/types/FallbackSmallestAiVoiceId.ts index 2ded9c50..390f3958 100644 --- a/src/api/types/FallbackSmallestAiVoiceId.ts +++ b/src/api/types/FallbackSmallestAiVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/FallbackSmallestAiVoiceIdEnum.ts b/src/api/types/FallbackSmallestAiVoiceIdEnum.ts index 74d508cc..a53bc760 100644 --- a/src/api/types/FallbackSmallestAiVoiceIdEnum.ts +++ b/src/api/types/FallbackSmallestAiVoiceIdEnum.ts @@ -1,33 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackSmallestAiVoiceIdEnum = - | "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"; export const FallbackSmallestAiVoiceIdEnum = { Emily: "emily", Jasmine: "jasmine", @@ -55,3 +27,5 @@ export const FallbackSmallestAiVoiceIdEnum = { Saina: "saina", Sanya: "sanya", } as const; +export type FallbackSmallestAiVoiceIdEnum = + (typeof FallbackSmallestAiVoiceIdEnum)[keyof typeof FallbackSmallestAiVoiceIdEnum]; diff --git a/src/api/types/FallbackSmallestAiVoiceModel.ts b/src/api/types/FallbackSmallestAiVoiceModel.ts new file mode 100644 index 00000000..280fd6e2 --- /dev/null +++ b/src/api/types/FallbackSmallestAiVoiceModel.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Smallest AI voice model to use. Defaults to 'lightning' when not specified. */ +export const FallbackSmallestAiVoiceModel = { + Lightning: "lightning", +} as const; +export type FallbackSmallestAiVoiceModel = + (typeof FallbackSmallestAiVoiceModel)[keyof typeof FallbackSmallestAiVoiceModel]; diff --git a/src/api/types/FallbackSmallestAiVoiceProvider.ts b/src/api/types/FallbackSmallestAiVoiceProvider.ts new file mode 100644 index 00000000..adced8dd --- /dev/null +++ b/src/api/types/FallbackSmallestAiVoiceProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackSmallestAiVoiceProvider = { + SmallestAi: "smallest-ai", +} as const; +export type FallbackSmallestAiVoiceProvider = + (typeof FallbackSmallestAiVoiceProvider)[keyof typeof FallbackSmallestAiVoiceProvider]; diff --git a/src/api/types/FallbackSpeechmaticsTranscriber.ts b/src/api/types/FallbackSpeechmaticsTranscriber.ts index bbaa5f0d..5f25b1dd 100644 --- a/src/api/types/FallbackSpeechmaticsTranscriber.ts +++ b/src/api/types/FallbackSpeechmaticsTranscriber.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackSpeechmaticsTranscriber { /** This is the transcription provider that will be used. */ - provider: "speechmatics"; + provider: Vapi.FallbackSpeechmaticsTranscriberProvider; /** This is the model that will be used for the transcription. */ - model?: "default"; + model?: Vapi.FallbackSpeechmaticsTranscriberModel; language?: Vapi.FallbackSpeechmaticsTranscriberLanguage; /** * 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. @@ -34,6 +32,8 @@ export interface FallbackSpeechmaticsTranscriber { * @default 2 */ maxSpeakers?: number; + /** Provides friendly speaker labels that map to diarization indices (Speaker 1 -> labels[0]). */ + speakerLabels?: string[]; /** * This enables partial transcripts during speech recognition. When false, only final transcripts are returned. * diff --git a/src/api/types/FallbackSpeechmaticsTranscriberLanguage.ts b/src/api/types/FallbackSpeechmaticsTranscriberLanguage.ts index 48999268..b180ce0a 100644 --- a/src/api/types/FallbackSpeechmaticsTranscriberLanguage.ts +++ b/src/api/types/FallbackSpeechmaticsTranscriberLanguage.ts @@ -1,64 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FallbackSpeechmaticsTranscriberLanguage = - | "auto" - | "ar" - | "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" - | "mt" - | "cmn" - | "mr" - | "mn" - | "no" - | "fa" - | "pl" - | "pt" - | "ro" - | "ru" - | "sk" - | "sl" - | "es" - | "sw" - | "sv" - | "ta" - | "th" - | "tr" - | "uk" - | "ur" - | "ug" - | "vi" - | "cy"; export const FallbackSpeechmaticsTranscriberLanguage = { Auto: "auto", Ar: "ar", @@ -117,3 +58,5 @@ export const FallbackSpeechmaticsTranscriberLanguage = { Vi: "vi", Cy: "cy", } as const; +export type FallbackSpeechmaticsTranscriberLanguage = + (typeof FallbackSpeechmaticsTranscriberLanguage)[keyof typeof FallbackSpeechmaticsTranscriberLanguage]; diff --git a/src/api/types/FallbackSpeechmaticsTranscriberModel.ts b/src/api/types/FallbackSpeechmaticsTranscriberModel.ts new file mode 100644 index 00000000..937d0d3b --- /dev/null +++ b/src/api/types/FallbackSpeechmaticsTranscriberModel.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used for the transcription. */ +export const FallbackSpeechmaticsTranscriberModel = { + Default: "default", +} as const; +export type FallbackSpeechmaticsTranscriberModel = + (typeof FallbackSpeechmaticsTranscriberModel)[keyof typeof FallbackSpeechmaticsTranscriberModel]; diff --git a/src/api/types/FallbackSpeechmaticsTranscriberNumeralStyle.ts b/src/api/types/FallbackSpeechmaticsTranscriberNumeralStyle.ts index 18599a9c..69339035 100644 --- a/src/api/types/FallbackSpeechmaticsTranscriberNumeralStyle.ts +++ b/src/api/types/FallbackSpeechmaticsTranscriberNumeralStyle.ts @@ -1,14 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This controls how numbers are formatted in the transcription output. * * @default 'written' */ -export type FallbackSpeechmaticsTranscriberNumeralStyle = "written" | "spoken"; export const FallbackSpeechmaticsTranscriberNumeralStyle = { Written: "written", Spoken: "spoken", } as const; +export type FallbackSpeechmaticsTranscriberNumeralStyle = + (typeof FallbackSpeechmaticsTranscriberNumeralStyle)[keyof typeof FallbackSpeechmaticsTranscriberNumeralStyle]; diff --git a/src/api/types/FallbackSpeechmaticsTranscriberOperatingPoint.ts b/src/api/types/FallbackSpeechmaticsTranscriberOperatingPoint.ts index 1c22be87..92ffea8a 100644 --- a/src/api/types/FallbackSpeechmaticsTranscriberOperatingPoint.ts +++ b/src/api/types/FallbackSpeechmaticsTranscriberOperatingPoint.ts @@ -1,14 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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. * * @default 'enhanced' */ -export type FallbackSpeechmaticsTranscriberOperatingPoint = "standard" | "enhanced"; export const FallbackSpeechmaticsTranscriberOperatingPoint = { Standard: "standard", Enhanced: "enhanced", } as const; +export type FallbackSpeechmaticsTranscriberOperatingPoint = + (typeof FallbackSpeechmaticsTranscriberOperatingPoint)[keyof typeof FallbackSpeechmaticsTranscriberOperatingPoint]; diff --git a/src/api/types/FallbackSpeechmaticsTranscriberProvider.ts b/src/api/types/FallbackSpeechmaticsTranscriberProvider.ts new file mode 100644 index 00000000..2cb30d15 --- /dev/null +++ b/src/api/types/FallbackSpeechmaticsTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackSpeechmaticsTranscriberProvider = { + Speechmatics: "speechmatics", +} as const; +export type FallbackSpeechmaticsTranscriberProvider = + (typeof FallbackSpeechmaticsTranscriberProvider)[keyof typeof FallbackSpeechmaticsTranscriberProvider]; diff --git a/src/api/types/FallbackSpeechmaticsTranscriberRegion.ts b/src/api/types/FallbackSpeechmaticsTranscriberRegion.ts index 69d1a349..8e1e2920 100644 --- a/src/api/types/FallbackSpeechmaticsTranscriberRegion.ts +++ b/src/api/types/FallbackSpeechmaticsTranscriberRegion.ts @@ -1,14 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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' */ -export type FallbackSpeechmaticsTranscriberRegion = "eu" | "us"; export const FallbackSpeechmaticsTranscriberRegion = { Eu: "eu", Us: "us", } as const; +export type FallbackSpeechmaticsTranscriberRegion = + (typeof FallbackSpeechmaticsTranscriberRegion)[keyof typeof FallbackSpeechmaticsTranscriberRegion]; diff --git a/src/api/types/FallbackTalkscriberTranscriber.ts b/src/api/types/FallbackTalkscriberTranscriber.ts index d0a588ea..64a07993 100644 --- a/src/api/types/FallbackTalkscriberTranscriber.ts +++ b/src/api/types/FallbackTalkscriberTranscriber.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackTalkscriberTranscriber { /** This is the transcription provider that will be used. */ - provider: "talkscriber"; + provider: Vapi.FallbackTalkscriberTranscriberProvider; /** This is the model that will be used for the transcription. */ - model?: "whisper"; + model?: Vapi.FallbackTalkscriberTranscriberModel; /** 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 */ language?: Vapi.FallbackTalkscriberTranscriberLanguage; } diff --git a/src/api/types/FallbackTalkscriberTranscriberLanguage.ts b/src/api/types/FallbackTalkscriberTranscriberLanguage.ts index 1178dedd..32144122 100644 --- a/src/api/types/FallbackTalkscriberTranscriberLanguage.ts +++ b/src/api/types/FallbackTalkscriberTranscriberLanguage.ts @@ -1,111 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * 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 - */ -export type FallbackTalkscriberTranscriberLanguage = - | "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"; +/** 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 */ export const FallbackTalkscriberTranscriberLanguage = { En: "en", Zh: "zh", @@ -208,3 +103,5 @@ export const FallbackTalkscriberTranscriberLanguage = { Su: "su", Yue: "yue", } as const; +export type FallbackTalkscriberTranscriberLanguage = + (typeof FallbackTalkscriberTranscriberLanguage)[keyof typeof FallbackTalkscriberTranscriberLanguage]; diff --git a/src/api/types/FallbackTalkscriberTranscriberModel.ts b/src/api/types/FallbackTalkscriberTranscriberModel.ts new file mode 100644 index 00000000..d7c0d844 --- /dev/null +++ b/src/api/types/FallbackTalkscriberTranscriberModel.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used for the transcription. */ +export const FallbackTalkscriberTranscriberModel = { + Whisper: "whisper", +} as const; +export type FallbackTalkscriberTranscriberModel = + (typeof FallbackTalkscriberTranscriberModel)[keyof typeof FallbackTalkscriberTranscriberModel]; diff --git a/src/api/types/FallbackTalkscriberTranscriberProvider.ts b/src/api/types/FallbackTalkscriberTranscriberProvider.ts new file mode 100644 index 00000000..3f9a27ea --- /dev/null +++ b/src/api/types/FallbackTalkscriberTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const FallbackTalkscriberTranscriberProvider = { + Talkscriber: "talkscriber", +} as const; +export type FallbackTalkscriberTranscriberProvider = + (typeof FallbackTalkscriberTranscriberProvider)[keyof typeof FallbackTalkscriberTranscriberProvider]; diff --git a/src/api/types/FallbackTavusVoice.ts b/src/api/types/FallbackTavusVoice.ts index 6b2a7f57..09faa60b 100644 --- a/src/api/types/FallbackTavusVoice.ts +++ b/src/api/types/FallbackTavusVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackTavusVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "tavus"; + provider: Vapi.FallbackTavusVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.FallbackTavusVoiceVoiceId; /** This is the unique identifier for the persona that the replica will use in the conversation. */ diff --git a/src/api/types/FallbackTavusVoiceProvider.ts b/src/api/types/FallbackTavusVoiceProvider.ts new file mode 100644 index 00000000..1e5b0402 --- /dev/null +++ b/src/api/types/FallbackTavusVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackTavusVoiceProvider = { + Tavus: "tavus", +} as const; +export type FallbackTavusVoiceProvider = (typeof FallbackTavusVoiceProvider)[keyof typeof FallbackTavusVoiceProvider]; diff --git a/src/api/types/FallbackTavusVoiceVoiceId.ts b/src/api/types/FallbackTavusVoiceVoiceId.ts index 4e1eae49..6b18c41a 100644 --- a/src/api/types/FallbackTavusVoiceVoiceId.ts +++ b/src/api/types/FallbackTavusVoiceVoiceId.ts @@ -1,8 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. */ -export type FallbackTavusVoiceVoiceId = "r52da2535a" | string; +export type FallbackTavusVoiceVoiceId = Vapi.FallbackTavusVoiceVoiceIdZero | string; diff --git a/src/api/types/FallbackTavusVoiceVoiceIdZero.ts b/src/api/types/FallbackTavusVoiceVoiceIdZero.ts new file mode 100644 index 00000000..d42919ea --- /dev/null +++ b/src/api/types/FallbackTavusVoiceVoiceIdZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const FallbackTavusVoiceVoiceIdZero = { + R52Da2535A: "r52da2535a", +} as const; +export type FallbackTavusVoiceVoiceIdZero = + (typeof FallbackTavusVoiceVoiceIdZero)[keyof typeof FallbackTavusVoiceVoiceIdZero]; diff --git a/src/api/types/FallbackTranscriberPlan.ts b/src/api/types/FallbackTranscriberPlan.ts index d4f3a34c..3eeeff5a 100644 --- a/src/api/types/FallbackTranscriberPlan.ts +++ b/src/api/types/FallbackTranscriberPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackTranscriberPlan { transcribers: Vapi.FallbackTranscriberPlanTranscribersItem[]; diff --git a/src/api/types/FallbackTranscriberPlanTranscribersItem.ts b/src/api/types/FallbackTranscriberPlanTranscribersItem.ts index 4fc0c82d..d45419a2 100644 --- a/src/api/types/FallbackTranscriberPlanTranscribersItem.ts +++ b/src/api/types/FallbackTranscriberPlanTranscribersItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type FallbackTranscriberPlanTranscribersItem = | Vapi.FallbackAssemblyAiTranscriber diff --git a/src/api/types/FallbackVapiVoice.ts b/src/api/types/FallbackVapiVoice.ts index ccecf98b..71661c42 100644 --- a/src/api/types/FallbackVapiVoice.ts +++ b/src/api/types/FallbackVapiVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FallbackVapiVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "vapi"; + provider: Vapi.FallbackVapiVoiceProvider; /** The voices provided by Vapi */ voiceId: Vapi.FallbackVapiVoiceVoiceId; /** diff --git a/src/api/types/FallbackVapiVoiceProvider.ts b/src/api/types/FallbackVapiVoiceProvider.ts new file mode 100644 index 00000000..9665b8fe --- /dev/null +++ b/src/api/types/FallbackVapiVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const FallbackVapiVoiceProvider = { + Vapi: "vapi", +} as const; +export type FallbackVapiVoiceProvider = (typeof FallbackVapiVoiceProvider)[keyof typeof FallbackVapiVoiceProvider]; diff --git a/src/api/types/FallbackVapiVoiceVoiceId.ts b/src/api/types/FallbackVapiVoiceVoiceId.ts index 1c84ba1d..9a87a741 100644 --- a/src/api/types/FallbackVapiVoiceVoiceId.ts +++ b/src/api/types/FallbackVapiVoiceVoiceId.ts @@ -1,22 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The voices provided by Vapi - */ -export type FallbackVapiVoiceVoiceId = - | "Elliot" - | "Kylie" - | "Rohan" - | "Lily" - | "Savannah" - | "Hana" - | "Neha" - | "Cole" - | "Harry" - | "Paige" - | "Spencer"; +/** The voices provided by Vapi */ export const FallbackVapiVoiceVoiceId = { Elliot: "Elliot", Kylie: "Kylie", @@ -29,4 +13,7 @@ export const FallbackVapiVoiceVoiceId = { Harry: "Harry", Paige: "Paige", Spencer: "Spencer", + Leah: "Leah", + Tara: "Tara", } as const; +export type FallbackVapiVoiceVoiceId = (typeof FallbackVapiVoiceVoiceId)[keyof typeof FallbackVapiVoiceVoiceId]; diff --git a/src/api/types/FileObject.ts b/src/api/types/FileObject.ts new file mode 100644 index 00000000..b4aa566a --- /dev/null +++ b/src/api/types/FileObject.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const FileObject = { + File: "file", +} as const; +export type FileObject = (typeof FileObject)[keyof typeof FileObject]; diff --git a/src/api/types/FileStatus.ts b/src/api/types/FileStatus.ts index 64d4089e..a6a168cf 100644 --- a/src/api/types/FileStatus.ts +++ b/src/api/types/FileStatus.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FileStatus = "processing" | "done" | "failed"; export const FileStatus = { Processing: "processing", Done: "done", Failed: "failed", } as const; +export type FileStatus = (typeof FileStatus)[keyof typeof FileStatus]; diff --git a/src/api/types/File_.ts b/src/api/types/File_.ts index 18e9b899..d7d040fa 100644 --- a/src/api/types/File_.ts +++ b/src/api/types/File_.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface File_ { - object?: "file"; + object?: Vapi.FileObject; status?: Vapi.FileStatus; /** This is the name of the file. This is just for your own reference. */ name?: string; diff --git a/src/api/types/FilterDateTypeColumnOnCallTable.ts b/src/api/types/FilterDateTypeColumnOnCallTable.ts new file mode 100644 index 00000000..c3b58c8b --- /dev/null +++ b/src/api/types/FilterDateTypeColumnOnCallTable.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface FilterDateTypeColumnOnCallTable { + /** + * 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. + */ + column: Vapi.FilterDateTypeColumnOnCallTableColumn; + /** + * This is the operator to use for the filter. + * For date type columns, the operator must be "=", ">", "<", ">=", "<=" + */ + operator: Vapi.FilterDateTypeColumnOnCallTableOperator; + /** + * This is the value to filter on. + * Must be a valid ISO 8601 date-time string. + */ + value: string; +} diff --git a/src/api/types/FilterDateTypeColumnOnCallTableColumn.ts b/src/api/types/FilterDateTypeColumnOnCallTableColumn.ts new file mode 100644 index 00000000..a45063b0 --- /dev/null +++ b/src/api/types/FilterDateTypeColumnOnCallTableColumn.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const FilterDateTypeColumnOnCallTableColumn = { + StartedAt: "startedAt", + EndedAt: "endedAt", +} as const; +export type FilterDateTypeColumnOnCallTableColumn = + (typeof FilterDateTypeColumnOnCallTableColumn)[keyof typeof FilterDateTypeColumnOnCallTableColumn]; diff --git a/src/api/types/FilterDateTypeColumnOnCallTableOperator.ts b/src/api/types/FilterDateTypeColumnOnCallTableOperator.ts new file mode 100644 index 00000000..9d065be0 --- /dev/null +++ b/src/api/types/FilterDateTypeColumnOnCallTableOperator.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the operator to use for the filter. + * For date type columns, the operator must be "=", ">", "<", ">=", "<=" + */ +export const FilterDateTypeColumnOnCallTableOperator = { + EqualTo: "=", + NotEquals: "!=", + GreaterThan: ">", + LessThan: "<", + GreaterThanOrEqualTo: ">=", + LessThanOrEqualTo: "<=", +} as const; +export type FilterDateTypeColumnOnCallTableOperator = + (typeof FilterDateTypeColumnOnCallTableOperator)[keyof typeof FilterDateTypeColumnOnCallTableOperator]; diff --git a/src/api/types/FilterNumberArrayTypeColumnOnCallTable.ts b/src/api/types/FilterNumberArrayTypeColumnOnCallTable.ts new file mode 100644 index 00000000..a6ee7e63 --- /dev/null +++ b/src/api/types/FilterNumberArrayTypeColumnOnCallTable.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface FilterNumberArrayTypeColumnOnCallTable { + /** + * 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. + */ + column: Vapi.FilterNumberArrayTypeColumnOnCallTableColumn; + /** + * This is the operator to use for the filter. + * The operator must be `in` or `not_in`. + */ + operator: Vapi.FilterNumberArrayTypeColumnOnCallTableOperator; + /** This is the value to filter on. */ + value: number[]; +} diff --git a/src/api/types/FilterNumberArrayTypeColumnOnCallTableColumn.ts b/src/api/types/FilterNumberArrayTypeColumnOnCallTableColumn.ts new file mode 100644 index 00000000..54e61c92 --- /dev/null +++ b/src/api/types/FilterNumberArrayTypeColumnOnCallTableColumn.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const FilterNumberArrayTypeColumnOnCallTableColumn = { + Duration: "duration", + Cost: "cost", + AverageModelLatency: "averageModelLatency", + AverageVoiceLatency: "averageVoiceLatency", + AverageTranscriberLatency: "averageTranscriberLatency", + AverageTurnLatency: "averageTurnLatency", + AverageEndpointingLatency: "averageEndpointingLatency", +} as const; +export type FilterNumberArrayTypeColumnOnCallTableColumn = + (typeof FilterNumberArrayTypeColumnOnCallTableColumn)[keyof typeof FilterNumberArrayTypeColumnOnCallTableColumn]; diff --git a/src/api/types/FilterNumberArrayTypeColumnOnCallTableOperator.ts b/src/api/types/FilterNumberArrayTypeColumnOnCallTableOperator.ts new file mode 100644 index 00000000..d6ca717b --- /dev/null +++ b/src/api/types/FilterNumberArrayTypeColumnOnCallTableOperator.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the operator to use for the filter. + * The operator must be `in` or `not_in`. + */ +export const FilterNumberArrayTypeColumnOnCallTableOperator = { + In: "in", + NotIn: "not_in", +} as const; +export type FilterNumberArrayTypeColumnOnCallTableOperator = + (typeof FilterNumberArrayTypeColumnOnCallTableOperator)[keyof typeof FilterNumberArrayTypeColumnOnCallTableOperator]; diff --git a/src/api/types/FilterNumberTypeColumnOnCallTable.ts b/src/api/types/FilterNumberTypeColumnOnCallTable.ts new file mode 100644 index 00000000..d9337120 --- /dev/null +++ b/src/api/types/FilterNumberTypeColumnOnCallTable.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface FilterNumberTypeColumnOnCallTable { + /** + * 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. + */ + column: Vapi.FilterNumberTypeColumnOnCallTableColumn; + /** + * This is the operator to use for the filter. + * For number type columns, the operator must be "=", ">", "<", ">=", "<=" + */ + operator: Vapi.FilterNumberTypeColumnOnCallTableOperator; + /** This is the value to filter on. */ + value: number; +} diff --git a/src/api/types/FilterNumberTypeColumnOnCallTableColumn.ts b/src/api/types/FilterNumberTypeColumnOnCallTableColumn.ts new file mode 100644 index 00000000..5d697035 --- /dev/null +++ b/src/api/types/FilterNumberTypeColumnOnCallTableColumn.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const FilterNumberTypeColumnOnCallTableColumn = { + Duration: "duration", + Cost: "cost", + AverageModelLatency: "averageModelLatency", + AverageVoiceLatency: "averageVoiceLatency", + AverageTranscriberLatency: "averageTranscriberLatency", + AverageTurnLatency: "averageTurnLatency", + AverageEndpointingLatency: "averageEndpointingLatency", +} as const; +export type FilterNumberTypeColumnOnCallTableColumn = + (typeof FilterNumberTypeColumnOnCallTableColumn)[keyof typeof FilterNumberTypeColumnOnCallTableColumn]; diff --git a/src/api/types/FilterNumberTypeColumnOnCallTableOperator.ts b/src/api/types/FilterNumberTypeColumnOnCallTableOperator.ts new file mode 100644 index 00000000..fd7df225 --- /dev/null +++ b/src/api/types/FilterNumberTypeColumnOnCallTableOperator.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the operator to use for the filter. + * For number type columns, the operator must be "=", ">", "<", ">=", "<=" + */ +export const FilterNumberTypeColumnOnCallTableOperator = { + EqualTo: "=", + NotEquals: "!=", + GreaterThan: ">", + LessThan: "<", + GreaterThanOrEqualTo: ">=", + LessThanOrEqualTo: "<=", +} as const; +export type FilterNumberTypeColumnOnCallTableOperator = + (typeof FilterNumberTypeColumnOnCallTableOperator)[keyof typeof FilterNumberTypeColumnOnCallTableOperator]; diff --git a/src/api/types/FilterStringArrayTypeColumnOnCallTable.ts b/src/api/types/FilterStringArrayTypeColumnOnCallTable.ts new file mode 100644 index 00000000..235000b8 --- /dev/null +++ b/src/api/types/FilterStringArrayTypeColumnOnCallTable.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface FilterStringArrayTypeColumnOnCallTable { + /** + * 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. + */ + column: Vapi.FilterStringArrayTypeColumnOnCallTableColumn; + /** + * This is the operator to use for the filter. + * The operator must be `in` or `not_in`. + */ + operator: Vapi.FilterStringArrayTypeColumnOnCallTableOperator; + /** These are the values to filter on. */ + value: string[]; +} diff --git a/src/api/types/FilterStringArrayTypeColumnOnCallTableColumn.ts b/src/api/types/FilterStringArrayTypeColumnOnCallTableColumn.ts new file mode 100644 index 00000000..66769fc8 --- /dev/null +++ b/src/api/types/FilterStringArrayTypeColumnOnCallTableColumn.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const FilterStringArrayTypeColumnOnCallTableColumn = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + CustomerNumber: "customerNumber", + Status: "status", + EndedReason: "endedReason", + ForwardedPhoneNumber: "forwardedPhoneNumber", + CampaignId: "campaignId", +} as const; +export type FilterStringArrayTypeColumnOnCallTableColumn = + (typeof FilterStringArrayTypeColumnOnCallTableColumn)[keyof typeof FilterStringArrayTypeColumnOnCallTableColumn]; diff --git a/src/api/types/FilterStringArrayTypeColumnOnCallTableOperator.ts b/src/api/types/FilterStringArrayTypeColumnOnCallTableOperator.ts new file mode 100644 index 00000000..5fb9f9f0 --- /dev/null +++ b/src/api/types/FilterStringArrayTypeColumnOnCallTableOperator.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the operator to use for the filter. + * The operator must be `in` or `not_in`. + */ +export const FilterStringArrayTypeColumnOnCallTableOperator = { + In: "in", + NotIn: "not_in", +} as const; +export type FilterStringArrayTypeColumnOnCallTableOperator = + (typeof FilterStringArrayTypeColumnOnCallTableOperator)[keyof typeof FilterStringArrayTypeColumnOnCallTableOperator]; diff --git a/src/api/types/FilterStringTypeColumnOnCallTable.ts b/src/api/types/FilterStringTypeColumnOnCallTable.ts new file mode 100644 index 00000000..5e7d0dc9 --- /dev/null +++ b/src/api/types/FilterStringTypeColumnOnCallTable.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface FilterStringTypeColumnOnCallTable { + /** + * 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. + */ + column: Vapi.FilterStringTypeColumnOnCallTableColumn; + /** + * This is the operator to use for the filter. + * For string type columns, the operator must be "=", "!=", "contains", "not contains" + */ + operator: Vapi.FilterStringTypeColumnOnCallTableOperator; + /** This is the value to filter on. */ + value: string; +} diff --git a/src/api/types/FilterStringTypeColumnOnCallTableColumn.ts b/src/api/types/FilterStringTypeColumnOnCallTableColumn.ts new file mode 100644 index 00000000..1750164b --- /dev/null +++ b/src/api/types/FilterStringTypeColumnOnCallTableColumn.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const FilterStringTypeColumnOnCallTableColumn = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + CustomerNumber: "customerNumber", + Status: "status", + EndedReason: "endedReason", + ForwardedPhoneNumber: "forwardedPhoneNumber", + CampaignId: "campaignId", +} as const; +export type FilterStringTypeColumnOnCallTableColumn = + (typeof FilterStringTypeColumnOnCallTableColumn)[keyof typeof FilterStringTypeColumnOnCallTableColumn]; diff --git a/src/api/types/FilterStringTypeColumnOnCallTableOperator.ts b/src/api/types/FilterStringTypeColumnOnCallTableOperator.ts new file mode 100644 index 00000000..6db46c9c --- /dev/null +++ b/src/api/types/FilterStringTypeColumnOnCallTableOperator.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the operator to use for the filter. + * For string type columns, the operator must be "=", "!=", "contains", "not contains" + */ +export const FilterStringTypeColumnOnCallTableOperator = { + EqualTo: "=", + NotEquals: "!=", + Contains: "contains", + NotContains: "not_contains", +} as const; +export type FilterStringTypeColumnOnCallTableOperator = + (typeof FilterStringTypeColumnOnCallTableOperator)[keyof typeof FilterStringTypeColumnOnCallTableOperator]; diff --git a/src/api/types/FilterStructuredOutputColumnOnCallTable.ts b/src/api/types/FilterStructuredOutputColumnOnCallTable.ts new file mode 100644 index 00000000..e6b8a1bc --- /dev/null +++ b/src/api/types/FilterStructuredOutputColumnOnCallTable.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface FilterStructuredOutputColumnOnCallTable { + /** + * 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. + */ + column: Vapi.FilterStructuredOutputColumnOnCallTableColumn; + /** + * 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" + */ + operator: Vapi.FilterStructuredOutputColumnOnCallTableOperator; + /** + * This is the value to filter on. + * The value type depends on the structured output type being filtered. + */ + value: Record; +} diff --git a/src/api/types/FilterStructuredOutputColumnOnCallTableColumn.ts b/src/api/types/FilterStructuredOutputColumnOnCallTableColumn.ts new file mode 100644 index 00000000..338541f2 --- /dev/null +++ b/src/api/types/FilterStructuredOutputColumnOnCallTableColumn.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const FilterStructuredOutputColumnOnCallTableColumn = { + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type FilterStructuredOutputColumnOnCallTableColumn = + (typeof FilterStructuredOutputColumnOnCallTableColumn)[keyof typeof FilterStructuredOutputColumnOnCallTableColumn]; diff --git a/src/api/types/FilterStructuredOutputColumnOnCallTableOperator.ts b/src/api/types/FilterStructuredOutputColumnOnCallTableOperator.ts new file mode 100644 index 00000000..dc9fdf29 --- /dev/null +++ b/src/api/types/FilterStructuredOutputColumnOnCallTableOperator.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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" + */ +export const FilterStructuredOutputColumnOnCallTableOperator = { + EqualTo: "=", + NotEquals: "!=", + GreaterThan: ">", + LessThan: "<", + GreaterThanOrEqualTo: ">=", + LessThanOrEqualTo: "<=", + In: "in", + NotIn: "not_in", + Contains: "contains", + NotContains: "not_contains", +} as const; +export type FilterStructuredOutputColumnOnCallTableOperator = + (typeof FilterStructuredOutputColumnOnCallTableOperator)[keyof typeof FilterStructuredOutputColumnOnCallTableOperator]; diff --git a/src/api/types/FormatPlan.ts b/src/api/types/FormatPlan.ts index fd507c3d..b34b1c3f 100644 --- a/src/api/types/FormatPlan.ts +++ b/src/api/types/FormatPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FormatPlan { /** diff --git a/src/api/types/FormatPlanFormattersEnabledItem.ts b/src/api/types/FormatPlanFormattersEnabledItem.ts index 319f89d6..fd34952e 100644 --- a/src/api/types/FormatPlanFormattersEnabledItem.ts +++ b/src/api/types/FormatPlanFormattersEnabledItem.ts @@ -1,25 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormatPlanFormattersEnabledItem = - | "markdown" - | "asterisk" - | "quote" - | "dash" - | "newline" - | "colon" - | "acronym" - | "dollarAmount" - | "email" - | "date" - | "time" - | "distance" - | "unit" - | "percentage" - | "phoneNumber" - | "number" - | "stripAsterisk"; export const FormatPlanFormattersEnabledItem = { Markdown: "markdown", Asterisk: "asterisk", @@ -39,3 +19,5 @@ export const FormatPlanFormattersEnabledItem = { Number: "number", StripAsterisk: "stripAsterisk", } as const; +export type FormatPlanFormattersEnabledItem = + (typeof FormatPlanFormattersEnabledItem)[keyof typeof FormatPlanFormattersEnabledItem]; diff --git a/src/api/types/FormatPlanReplacementsItem.ts b/src/api/types/FormatPlanReplacementsItem.ts index ae8fed9e..6f3f4f4a 100644 --- a/src/api/types/FormatPlanReplacementsItem.ts +++ b/src/api/types/FormatPlanReplacementsItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type FormatPlanReplacementsItem = Vapi.ExactReplacement | Vapi.RegexReplacement; diff --git a/src/api/types/FourierDenoisingPlan.ts b/src/api/types/FourierDenoisingPlan.ts index 87437b08..57109b51 100644 --- a/src/api/types/FourierDenoisingPlan.ts +++ b/src/api/types/FourierDenoisingPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FourierDenoisingPlan { /** Whether Fourier denoising is enabled. Note that this is experimental and may not work as expected. */ diff --git a/src/api/types/FunctionCall.ts b/src/api/types/FunctionCall.ts index bc62cc4f..0540cb63 100644 --- a/src/api/types/FunctionCall.ts +++ b/src/api/types/FunctionCall.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FunctionCall { /** This is the arguments to call the function with */ diff --git a/src/api/types/FunctionCallAssistantHookAction.ts b/src/api/types/FunctionCallAssistantHookAction.ts index 98447ef9..5c037e42 100644 --- a/src/api/types/FunctionCallAssistantHookAction.ts +++ b/src/api/types/FunctionCallAssistantHookAction.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FunctionCallAssistantHookAction = unknown; diff --git a/src/api/types/FunctionCallHookAction.ts b/src/api/types/FunctionCallHookAction.ts index 51e7fac1..8a4df4a4 100644 --- a/src/api/types/FunctionCallHookAction.ts +++ b/src/api/types/FunctionCallHookAction.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FunctionCallHookAction { /** @@ -12,7 +10,7 @@ export interface FunctionCallHookAction { */ messages?: Vapi.FunctionCallHookActionMessagesItem[]; /** The type of tool. "function" for Function tool. */ - type: "function"; + type: Vapi.FunctionCallHookActionType; /** * This determines if the tool is async. * diff --git a/src/api/types/FunctionCallHookActionMessagesItem.ts b/src/api/types/FunctionCallHookActionMessagesItem.ts index e840246e..d71b3fa8 100644 --- a/src/api/types/FunctionCallHookActionMessagesItem.ts +++ b/src/api/types/FunctionCallHookActionMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type FunctionCallHookActionMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/FunctionCallHookActionType.ts b/src/api/types/FunctionCallHookActionType.ts new file mode 100644 index 00000000..7207d189 --- /dev/null +++ b/src/api/types/FunctionCallHookActionType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "function" for Function tool. */ +export const FunctionCallHookActionType = { + Function: "function", +} as const; +export type FunctionCallHookActionType = (typeof FunctionCallHookActionType)[keyof typeof FunctionCallHookActionType]; diff --git a/src/api/types/FunctionTool.ts b/src/api/types/FunctionTool.ts index 1666d3bc..561750cb 100644 --- a/src/api/types/FunctionTool.ts +++ b/src/api/types/FunctionTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FunctionTool { /** diff --git a/src/api/types/FunctionToolMessagesItem.ts b/src/api/types/FunctionToolMessagesItem.ts index b5108746..2a2a9fac 100644 --- a/src/api/types/FunctionToolMessagesItem.ts +++ b/src/api/types/FunctionToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type FunctionToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/FunctionToolProviderDetails.ts b/src/api/types/FunctionToolProviderDetails.ts index 86271c42..38b66cdd 100644 --- a/src/api/types/FunctionToolProviderDetails.ts +++ b/src/api/types/FunctionToolProviderDetails.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FunctionToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "function" for Function tool. */ - type: "function"; + type: Vapi.FunctionToolProviderDetailsType; } diff --git a/src/api/types/FunctionToolProviderDetailsType.ts b/src/api/types/FunctionToolProviderDetailsType.ts new file mode 100644 index 00000000..0976bf01 --- /dev/null +++ b/src/api/types/FunctionToolProviderDetailsType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "function" for Function tool. */ +export const FunctionToolProviderDetailsType = { + Function: "function", +} as const; +export type FunctionToolProviderDetailsType = + (typeof FunctionToolProviderDetailsType)[keyof typeof FunctionToolProviderDetailsType]; diff --git a/src/api/types/FunctionToolWithToolCall.ts b/src/api/types/FunctionToolWithToolCall.ts index a90cc7bb..f3447462 100644 --- a/src/api/types/FunctionToolWithToolCall.ts +++ b/src/api/types/FunctionToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface FunctionToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface FunctionToolWithToolCall { */ messages?: Vapi.FunctionToolWithToolCallMessagesItem[]; /** The type of tool. "function" for Function tool. */ - type: "function"; + type: Vapi.FunctionToolWithToolCallType; /** * This determines if the tool is async. * diff --git a/src/api/types/FunctionToolWithToolCallMessagesItem.ts b/src/api/types/FunctionToolWithToolCallMessagesItem.ts index 19aa330c..64fcd7b3 100644 --- a/src/api/types/FunctionToolWithToolCallMessagesItem.ts +++ b/src/api/types/FunctionToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type FunctionToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/FunctionToolWithToolCallType.ts b/src/api/types/FunctionToolWithToolCallType.ts new file mode 100644 index 00000000..e8d618a1 --- /dev/null +++ b/src/api/types/FunctionToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "function" for Function tool. */ +export const FunctionToolWithToolCallType = { + Function: "function", +} as const; +export type FunctionToolWithToolCallType = + (typeof FunctionToolWithToolCallType)[keyof typeof FunctionToolWithToolCallType]; diff --git a/src/api/types/GcpCredential.ts b/src/api/types/GcpCredential.ts index cbf15c82..2aab6e9d 100644 --- a/src/api/types/GcpCredential.ts +++ b/src/api/types/GcpCredential.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GcpCredential { - provider: "gcp"; + provider: Vapi.GcpCredentialProvider; /** This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order. */ fallbackIndex?: number; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/GcpCredentialProvider.ts b/src/api/types/GcpCredentialProvider.ts new file mode 100644 index 00000000..8eea5bf7 --- /dev/null +++ b/src/api/types/GcpCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GcpCredentialProvider = { + Gcp: "gcp", +} as const; +export type GcpCredentialProvider = (typeof GcpCredentialProvider)[keyof typeof GcpCredentialProvider]; diff --git a/src/api/types/GcpKey.ts b/src/api/types/GcpKey.ts index 86f790d6..bc65d9bf 100644 --- a/src/api/types/GcpKey.ts +++ b/src/api/types/GcpKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GcpKey { /** This is the type of the key. Most likely, this is "service_account". */ diff --git a/src/api/types/GeminiMultimodalLivePrebuiltVoiceConfig.ts b/src/api/types/GeminiMultimodalLivePrebuiltVoiceConfig.ts index 0f36b3de..c8072496 100644 --- a/src/api/types/GeminiMultimodalLivePrebuiltVoiceConfig.ts +++ b/src/api/types/GeminiMultimodalLivePrebuiltVoiceConfig.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GeminiMultimodalLivePrebuiltVoiceConfig { voiceName: Vapi.GeminiMultimodalLivePrebuiltVoiceConfigVoiceName; diff --git a/src/api/types/GeminiMultimodalLivePrebuiltVoiceConfigVoiceName.ts b/src/api/types/GeminiMultimodalLivePrebuiltVoiceConfigVoiceName.ts index 0305e23e..69367fdf 100644 --- a/src/api/types/GeminiMultimodalLivePrebuiltVoiceConfigVoiceName.ts +++ b/src/api/types/GeminiMultimodalLivePrebuiltVoiceConfigVoiceName.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type GeminiMultimodalLivePrebuiltVoiceConfigVoiceName = "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede"; export const GeminiMultimodalLivePrebuiltVoiceConfigVoiceName = { Puck: "Puck", Charon: "Charon", @@ -10,3 +7,5 @@ export const GeminiMultimodalLivePrebuiltVoiceConfigVoiceName = { Fenrir: "Fenrir", Aoede: "Aoede", } as const; +export type GeminiMultimodalLivePrebuiltVoiceConfigVoiceName = + (typeof GeminiMultimodalLivePrebuiltVoiceConfigVoiceName)[keyof typeof GeminiMultimodalLivePrebuiltVoiceConfigVoiceName]; diff --git a/src/api/types/GeminiMultimodalLiveSpeechConfig.ts b/src/api/types/GeminiMultimodalLiveSpeechConfig.ts index dd1404c8..4a04e9df 100644 --- a/src/api/types/GeminiMultimodalLiveSpeechConfig.ts +++ b/src/api/types/GeminiMultimodalLiveSpeechConfig.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GeminiMultimodalLiveSpeechConfig { voiceConfig: Vapi.GeminiMultimodalLiveVoiceConfig; diff --git a/src/api/types/GeminiMultimodalLiveVoiceConfig.ts b/src/api/types/GeminiMultimodalLiveVoiceConfig.ts index f2f792f6..66873c91 100644 --- a/src/api/types/GeminiMultimodalLiveVoiceConfig.ts +++ b/src/api/types/GeminiMultimodalLiveVoiceConfig.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GeminiMultimodalLiveVoiceConfig { prebuiltVoiceConfig: Vapi.GeminiMultimodalLivePrebuiltVoiceConfig; diff --git a/src/api/types/GetChatPaginatedDto.ts b/src/api/types/GetChatPaginatedDto.ts index 2af35e22..6ae1c223 100644 --- a/src/api/types/GetChatPaginatedDto.ts +++ b/src/api/types/GetChatPaginatedDto.ts @@ -1,18 +1,16 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GetChatPaginatedDto { /** This is the unique identifier for the assistant that will be used for the chat. */ assistantId?: string; /** This is the unique identifier for the squad that will be used for the chat. */ squadId?: string; - /** This is the unique identifier for the workflow that will be used for the chat. */ - workflowId?: string; /** This is the unique identifier for the session that will be used for the chat. */ sessionId?: string; + /** This is the unique identifier for the previous chat to filter by. */ + previousChatId?: string; /** This is the page number to return. Defaults to 1. */ page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ diff --git a/src/api/types/GetChatPaginatedDtoSortOrder.ts b/src/api/types/GetChatPaginatedDtoSortOrder.ts index 25957bde..99ada60c 100644 --- a/src/api/types/GetChatPaginatedDtoSortOrder.ts +++ b/src/api/types/GetChatPaginatedDtoSortOrder.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the sort order for pagination. Defaults to 'DESC'. - */ -export type GetChatPaginatedDtoSortOrder = "ASC" | "DESC"; +/** This is the sort order for pagination. Defaults to 'DESC'. */ export const GetChatPaginatedDtoSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type GetChatPaginatedDtoSortOrder = + (typeof GetChatPaginatedDtoSortOrder)[keyof typeof GetChatPaginatedDtoSortOrder]; diff --git a/src/api/types/GetEvalPaginatedDto.ts b/src/api/types/GetEvalPaginatedDto.ts index 8ed51b7d..46c67b5a 100644 --- a/src/api/types/GetEvalPaginatedDto.ts +++ b/src/api/types/GetEvalPaginatedDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GetEvalPaginatedDto { id?: string; diff --git a/src/api/types/GetEvalPaginatedDtoSortOrder.ts b/src/api/types/GetEvalPaginatedDtoSortOrder.ts index 62696a0b..ae8ec233 100644 --- a/src/api/types/GetEvalPaginatedDtoSortOrder.ts +++ b/src/api/types/GetEvalPaginatedDtoSortOrder.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the sort order for pagination. Defaults to 'DESC'. - */ -export type GetEvalPaginatedDtoSortOrder = "ASC" | "DESC"; +/** This is the sort order for pagination. Defaults to 'DESC'. */ export const GetEvalPaginatedDtoSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type GetEvalPaginatedDtoSortOrder = + (typeof GetEvalPaginatedDtoSortOrder)[keyof typeof GetEvalPaginatedDtoSortOrder]; diff --git a/src/api/types/GetEvalRunPaginatedDto.ts b/src/api/types/GetEvalRunPaginatedDto.ts index a19f2cf2..4cfd227d 100644 --- a/src/api/types/GetEvalRunPaginatedDto.ts +++ b/src/api/types/GetEvalRunPaginatedDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GetEvalRunPaginatedDto { id?: string; diff --git a/src/api/types/GetEvalRunPaginatedDtoSortOrder.ts b/src/api/types/GetEvalRunPaginatedDtoSortOrder.ts index 1faf89ec..ed5dccf1 100644 --- a/src/api/types/GetEvalRunPaginatedDtoSortOrder.ts +++ b/src/api/types/GetEvalRunPaginatedDtoSortOrder.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the sort order for pagination. Defaults to 'DESC'. - */ -export type GetEvalRunPaginatedDtoSortOrder = "ASC" | "DESC"; +/** This is the sort order for pagination. Defaults to 'DESC'. */ export const GetEvalRunPaginatedDtoSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type GetEvalRunPaginatedDtoSortOrder = + (typeof GetEvalRunPaginatedDtoSortOrder)[keyof typeof GetEvalRunPaginatedDtoSortOrder]; diff --git a/src/api/types/GetSessionPaginatedDto.ts b/src/api/types/GetSessionPaginatedDto.ts index 0814d8bb..4eae77bd 100644 --- a/src/api/types/GetSessionPaginatedDto.ts +++ b/src/api/types/GetSessionPaginatedDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GetSessionPaginatedDto { /** This is the name of the session to filter by. */ @@ -13,6 +11,8 @@ export interface GetSessionPaginatedDto { squadId?: string; /** This is the ID of the workflow to filter sessions by. */ workflowId?: string; + /** This is the customer information to filter by. */ + customer?: Vapi.CreateCustomerDto; /** This is the page number to return. Defaults to 1. */ page?: number; /** This is the sort order for pagination. Defaults to 'DESC'. */ diff --git a/src/api/types/GetSessionPaginatedDtoSortOrder.ts b/src/api/types/GetSessionPaginatedDtoSortOrder.ts index b0b578a2..eeea6735 100644 --- a/src/api/types/GetSessionPaginatedDtoSortOrder.ts +++ b/src/api/types/GetSessionPaginatedDtoSortOrder.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the sort order for pagination. Defaults to 'DESC'. - */ -export type GetSessionPaginatedDtoSortOrder = "ASC" | "DESC"; +/** This is the sort order for pagination. Defaults to 'DESC'. */ export const GetSessionPaginatedDtoSortOrder = { Asc: "ASC", Desc: "DESC", } as const; +export type GetSessionPaginatedDtoSortOrder = + (typeof GetSessionPaginatedDtoSortOrder)[keyof typeof GetSessionPaginatedDtoSortOrder]; diff --git a/src/api/types/GhlTool.ts b/src/api/types/GhlTool.ts index f5b38523..bb86559c 100644 --- a/src/api/types/GhlTool.ts +++ b/src/api/types/GhlTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GhlTool { /** @@ -12,7 +10,7 @@ export interface GhlTool { */ messages?: Vapi.GhlToolMessagesItem[]; /** The type of tool. "ghl" for GHL tool. */ - type: "ghl"; + type: Vapi.GhlToolType; /** This is the unique identifier for the tool. */ id: string; /** This is the unique identifier for the organization that this tool belongs to. */ diff --git a/src/api/types/GhlToolMessagesItem.ts b/src/api/types/GhlToolMessagesItem.ts index 43d8bdc3..15581337 100644 --- a/src/api/types/GhlToolMessagesItem.ts +++ b/src/api/types/GhlToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GhlToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GhlToolMetadata.ts b/src/api/types/GhlToolMetadata.ts index 7693f5b2..08d268fa 100644 --- a/src/api/types/GhlToolMetadata.ts +++ b/src/api/types/GhlToolMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GhlToolMetadata { workflowId?: string; diff --git a/src/api/types/GhlToolProviderDetails.ts b/src/api/types/GhlToolProviderDetails.ts index 32a552fc..3f6490aa 100644 --- a/src/api/types/GhlToolProviderDetails.ts +++ b/src/api/types/GhlToolProviderDetails.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GhlToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "ghl" for GHL tool. */ - type: "ghl"; + type: Vapi.GhlToolProviderDetailsType; workflowId?: string; workflowName?: string; webhookHookId?: string; diff --git a/src/api/types/GhlToolProviderDetailsType.ts b/src/api/types/GhlToolProviderDetailsType.ts new file mode 100644 index 00000000..a97f7894 --- /dev/null +++ b/src/api/types/GhlToolProviderDetailsType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "ghl" for GHL tool. */ +export const GhlToolProviderDetailsType = { + Ghl: "ghl", +} as const; +export type GhlToolProviderDetailsType = (typeof GhlToolProviderDetailsType)[keyof typeof GhlToolProviderDetailsType]; diff --git a/src/api/types/GhlToolType.ts b/src/api/types/GhlToolType.ts new file mode 100644 index 00000000..e9219c5d --- /dev/null +++ b/src/api/types/GhlToolType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "ghl" for GHL tool. */ +export const GhlToolType = { + Ghl: "ghl", +} as const; +export type GhlToolType = (typeof GhlToolType)[keyof typeof GhlToolType]; diff --git a/src/api/types/GhlToolWithToolCall.ts b/src/api/types/GhlToolWithToolCall.ts index fa855773..beeee18d 100644 --- a/src/api/types/GhlToolWithToolCall.ts +++ b/src/api/types/GhlToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GhlToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface GhlToolWithToolCall { */ messages?: Vapi.GhlToolWithToolCallMessagesItem[]; /** The type of tool. "ghl" for GHL tool. */ - type: "ghl"; + type: Vapi.GhlToolWithToolCallType; toolCall: Vapi.ToolCall; metadata: Vapi.GhlToolMetadata; /** diff --git a/src/api/types/GhlToolWithToolCallMessagesItem.ts b/src/api/types/GhlToolWithToolCallMessagesItem.ts index 76f076bb..ed339a20 100644 --- a/src/api/types/GhlToolWithToolCallMessagesItem.ts +++ b/src/api/types/GhlToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GhlToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GhlToolWithToolCallType.ts b/src/api/types/GhlToolWithToolCallType.ts new file mode 100644 index 00000000..8b7e4c67 --- /dev/null +++ b/src/api/types/GhlToolWithToolCallType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "ghl" for GHL tool. */ +export const GhlToolWithToolCallType = { + Ghl: "ghl", +} as const; +export type GhlToolWithToolCallType = (typeof GhlToolWithToolCallType)[keyof typeof GhlToolWithToolCallType]; diff --git a/src/api/types/GladiaCredential.ts b/src/api/types/GladiaCredential.ts index 81f6bc38..18e35d69 100644 --- a/src/api/types/GladiaCredential.ts +++ b/src/api/types/GladiaCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface GladiaCredential { - provider: "gladia"; + provider: Vapi.GladiaCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/GladiaCredentialProvider.ts b/src/api/types/GladiaCredentialProvider.ts new file mode 100644 index 00000000..4c62edfc --- /dev/null +++ b/src/api/types/GladiaCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GladiaCredentialProvider = { + Gladia: "gladia", +} as const; +export type GladiaCredentialProvider = (typeof GladiaCredentialProvider)[keyof typeof GladiaCredentialProvider]; diff --git a/src/api/types/GladiaCustomVocabularyConfigDto.ts b/src/api/types/GladiaCustomVocabularyConfigDto.ts index f6781bb4..d370172e 100644 --- a/src/api/types/GladiaCustomVocabularyConfigDto.ts +++ b/src/api/types/GladiaCustomVocabularyConfigDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GladiaCustomVocabularyConfigDto { /** Array of vocabulary items (strings or objects with value, pronunciations, intensity, language) */ diff --git a/src/api/types/GladiaCustomVocabularyConfigDtoVocabularyItem.ts b/src/api/types/GladiaCustomVocabularyConfigDtoVocabularyItem.ts index 3ec62feb..9cb3c624 100644 --- a/src/api/types/GladiaCustomVocabularyConfigDtoVocabularyItem.ts +++ b/src/api/types/GladiaCustomVocabularyConfigDtoVocabularyItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GladiaCustomVocabularyConfigDtoVocabularyItem = string | Vapi.GladiaVocabularyItemDto; diff --git a/src/api/types/GladiaTranscriber.ts b/src/api/types/GladiaTranscriber.ts index 79f29609..58818b3b 100644 --- a/src/api/types/GladiaTranscriber.ts +++ b/src/api/types/GladiaTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GladiaTranscriber { /** This is the transcription provider that will be used. */ - provider: "gladia"; + provider: Vapi.GladiaTranscriberProvider; /** This is the Gladia model that will be used. Default is 'fast' */ model?: Vapi.GladiaTranscriberModel; /** Defines how the transcription model detects the audio language. Default value is 'automatic single language'. */ diff --git a/src/api/types/GladiaTranscriberLanguage.ts b/src/api/types/GladiaTranscriberLanguage.ts index 2d74d74c..12da0cbd 100644 --- a/src/api/types/GladiaTranscriberLanguage.ts +++ b/src/api/types/GladiaTranscriberLanguage.ts @@ -1,110 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. - */ -export type GladiaTranscriberLanguage = - | "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"; +/** Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. */ export const GladiaTranscriberLanguage = { Af: "af", Sq: "sq", @@ -206,3 +102,4 @@ export const GladiaTranscriberLanguage = { Yi: "yi", Yo: "yo", } as const; +export type GladiaTranscriberLanguage = (typeof GladiaTranscriberLanguage)[keyof typeof GladiaTranscriberLanguage]; diff --git a/src/api/types/GladiaTranscriberLanguageBehaviour.ts b/src/api/types/GladiaTranscriberLanguageBehaviour.ts index 23b1d3c5..15859980 100644 --- a/src/api/types/GladiaTranscriberLanguageBehaviour.ts +++ b/src/api/types/GladiaTranscriberLanguageBehaviour.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type GladiaTranscriberLanguageBehaviour = - | "manual" - | "automatic single language" - | "automatic multiple languages"; export const GladiaTranscriberLanguageBehaviour = { Manual: "manual", AutomaticSingleLanguage: "automatic single language", AutomaticMultipleLanguages: "automatic multiple languages", } as const; +export type GladiaTranscriberLanguageBehaviour = + (typeof GladiaTranscriberLanguageBehaviour)[keyof typeof GladiaTranscriberLanguageBehaviour]; diff --git a/src/api/types/GladiaTranscriberLanguages.ts b/src/api/types/GladiaTranscriberLanguages.ts index 08114037..25d3b679 100644 --- a/src/api/types/GladiaTranscriberLanguages.ts +++ b/src/api/types/GladiaTranscriberLanguages.ts @@ -1,110 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'. - */ -export type GladiaTranscriberLanguages = - | "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"; +/** Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'. */ export const GladiaTranscriberLanguages = { Af: "af", Sq: "sq", @@ -206,3 +102,4 @@ export const GladiaTranscriberLanguages = { Yi: "yi", Yo: "yo", } as const; +export type GladiaTranscriberLanguages = (typeof GladiaTranscriberLanguages)[keyof typeof GladiaTranscriberLanguages]; diff --git a/src/api/types/GladiaTranscriberModel.ts b/src/api/types/GladiaTranscriberModel.ts index def2a68f..4c2bbf02 100644 --- a/src/api/types/GladiaTranscriberModel.ts +++ b/src/api/types/GladiaTranscriberModel.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type GladiaTranscriberModel = "fast" | "accurate" | "solaria-1"; export const GladiaTranscriberModel = { Fast: "fast", Accurate: "accurate", Solaria1: "solaria-1", } as const; +export type GladiaTranscriberModel = (typeof GladiaTranscriberModel)[keyof typeof GladiaTranscriberModel]; diff --git a/src/api/types/GladiaTranscriberProvider.ts b/src/api/types/GladiaTranscriberProvider.ts new file mode 100644 index 00000000..6524f40a --- /dev/null +++ b/src/api/types/GladiaTranscriberProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const GladiaTranscriberProvider = { + Gladia: "gladia", +} as const; +export type GladiaTranscriberProvider = (typeof GladiaTranscriberProvider)[keyof typeof GladiaTranscriberProvider]; diff --git a/src/api/types/GladiaTranscriberRegion.ts b/src/api/types/GladiaTranscriberRegion.ts index e56685c6..17ebfe2e 100644 --- a/src/api/types/GladiaTranscriberRegion.ts +++ b/src/api/types/GladiaTranscriberRegion.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Region for processing audio (us-west or eu-west) - */ -export type GladiaTranscriberRegion = "us-west" | "eu-west"; +/** Region for processing audio (us-west or eu-west) */ export const GladiaTranscriberRegion = { UsWest: "us-west", EuWest: "eu-west", } as const; +export type GladiaTranscriberRegion = (typeof GladiaTranscriberRegion)[keyof typeof GladiaTranscriberRegion]; diff --git a/src/api/types/GladiaVocabularyItemDto.ts b/src/api/types/GladiaVocabularyItemDto.ts index afe811b2..c55d3040 100644 --- a/src/api/types/GladiaVocabularyItemDto.ts +++ b/src/api/types/GladiaVocabularyItemDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GladiaVocabularyItemDto { /** The vocabulary word or phrase */ diff --git a/src/api/types/GlobalNodePlan.ts b/src/api/types/GlobalNodePlan.ts index a227e78e..43a39f37 100644 --- a/src/api/types/GlobalNodePlan.ts +++ b/src/api/types/GlobalNodePlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GlobalNodePlan { /** diff --git a/src/api/types/GoHighLevelCalendarAvailabilityTool.ts b/src/api/types/GoHighLevelCalendarAvailabilityTool.ts index 83684cb5..40d52060 100644 --- a/src/api/types/GoHighLevelCalendarAvailabilityTool.ts +++ b/src/api/types/GoHighLevelCalendarAvailabilityTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelCalendarAvailabilityTool { /** diff --git a/src/api/types/GoHighLevelCalendarAvailabilityToolMessagesItem.ts b/src/api/types/GoHighLevelCalendarAvailabilityToolMessagesItem.ts index f1759f40..a46b0722 100644 --- a/src/api/types/GoHighLevelCalendarAvailabilityToolMessagesItem.ts +++ b/src/api/types/GoHighLevelCalendarAvailabilityToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoHighLevelCalendarAvailabilityToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoHighLevelCalendarAvailabilityToolProviderDetails.ts b/src/api/types/GoHighLevelCalendarAvailabilityToolProviderDetails.ts index b2c82d56..914e185e 100644 --- a/src/api/types/GoHighLevelCalendarAvailabilityToolProviderDetails.ts +++ b/src/api/types/GoHighLevelCalendarAvailabilityToolProviderDetails.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelCalendarAvailabilityToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar availability check tool. */ - type: "gohighlevel.calendar.availability.check"; + type: Vapi.GoHighLevelCalendarAvailabilityToolProviderDetailsType; } diff --git a/src/api/types/GoHighLevelCalendarAvailabilityToolProviderDetailsType.ts b/src/api/types/GoHighLevelCalendarAvailabilityToolProviderDetailsType.ts new file mode 100644 index 00000000..a6f163fb --- /dev/null +++ b/src/api/types/GoHighLevelCalendarAvailabilityToolProviderDetailsType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar availability check tool. */ +export const GoHighLevelCalendarAvailabilityToolProviderDetailsType = { + GohighlevelCalendarAvailabilityCheck: "gohighlevel.calendar.availability.check", +} as const; +export type GoHighLevelCalendarAvailabilityToolProviderDetailsType = + (typeof GoHighLevelCalendarAvailabilityToolProviderDetailsType)[keyof typeof GoHighLevelCalendarAvailabilityToolProviderDetailsType]; diff --git a/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCall.ts b/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCall.ts index 5194cafd..80a9b55b 100644 --- a/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCall.ts +++ b/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelCalendarAvailabilityToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface GoHighLevelCalendarAvailabilityToolWithToolCall { */ messages?: Vapi.GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem[]; /** The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool. */ - type: "gohighlevel.calendar.availability.check"; + type: Vapi.GoHighLevelCalendarAvailabilityToolWithToolCallType; toolCall: Vapi.ToolCall; /** * This is the plan to reject a tool call based on the conversation state. diff --git a/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem.ts b/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem.ts index 217fdfca..b51ef805 100644 --- a/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem.ts +++ b/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCallType.ts b/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCallType.ts new file mode 100644 index 00000000..a7ecac71 --- /dev/null +++ b/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool. */ +export const GoHighLevelCalendarAvailabilityToolWithToolCallType = { + GohighlevelCalendarAvailabilityCheck: "gohighlevel.calendar.availability.check", +} as const; +export type GoHighLevelCalendarAvailabilityToolWithToolCallType = + (typeof GoHighLevelCalendarAvailabilityToolWithToolCallType)[keyof typeof GoHighLevelCalendarAvailabilityToolWithToolCallType]; diff --git a/src/api/types/GoHighLevelCalendarEventCreateTool.ts b/src/api/types/GoHighLevelCalendarEventCreateTool.ts index 7a3eaf06..46297523 100644 --- a/src/api/types/GoHighLevelCalendarEventCreateTool.ts +++ b/src/api/types/GoHighLevelCalendarEventCreateTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelCalendarEventCreateTool { /** diff --git a/src/api/types/GoHighLevelCalendarEventCreateToolMessagesItem.ts b/src/api/types/GoHighLevelCalendarEventCreateToolMessagesItem.ts index a0703894..3f9b44ad 100644 --- a/src/api/types/GoHighLevelCalendarEventCreateToolMessagesItem.ts +++ b/src/api/types/GoHighLevelCalendarEventCreateToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoHighLevelCalendarEventCreateToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoHighLevelCalendarEventCreateToolProviderDetails.ts b/src/api/types/GoHighLevelCalendarEventCreateToolProviderDetails.ts index b343e0e6..18aaa1d1 100644 --- a/src/api/types/GoHighLevelCalendarEventCreateToolProviderDetails.ts +++ b/src/api/types/GoHighLevelCalendarEventCreateToolProviderDetails.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelCalendarEventCreateToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar event create tool. */ - type: "gohighlevel.calendar.event.create"; + type: Vapi.GoHighLevelCalendarEventCreateToolProviderDetailsType; } diff --git a/src/api/types/GoHighLevelCalendarEventCreateToolProviderDetailsType.ts b/src/api/types/GoHighLevelCalendarEventCreateToolProviderDetailsType.ts new file mode 100644 index 00000000..e098e9e5 --- /dev/null +++ b/src/api/types/GoHighLevelCalendarEventCreateToolProviderDetailsType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar event create tool. */ +export const GoHighLevelCalendarEventCreateToolProviderDetailsType = { + GohighlevelCalendarEventCreate: "gohighlevel.calendar.event.create", +} as const; +export type GoHighLevelCalendarEventCreateToolProviderDetailsType = + (typeof GoHighLevelCalendarEventCreateToolProviderDetailsType)[keyof typeof GoHighLevelCalendarEventCreateToolProviderDetailsType]; diff --git a/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCall.ts b/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCall.ts index 31e80779..00c42517 100644 --- a/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCall.ts +++ b/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelCalendarEventCreateToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface GoHighLevelCalendarEventCreateToolWithToolCall { */ messages?: Vapi.GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem[]; /** The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool. */ - type: "gohighlevel.calendar.event.create"; + type: Vapi.GoHighLevelCalendarEventCreateToolWithToolCallType; toolCall: Vapi.ToolCall; /** * This is the plan to reject a tool call based on the conversation state. diff --git a/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem.ts b/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem.ts index 25e82260..f182794b 100644 --- a/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem.ts +++ b/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCallType.ts b/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCallType.ts new file mode 100644 index 00000000..87a9b03e --- /dev/null +++ b/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool. */ +export const GoHighLevelCalendarEventCreateToolWithToolCallType = { + GohighlevelCalendarEventCreate: "gohighlevel.calendar.event.create", +} as const; +export type GoHighLevelCalendarEventCreateToolWithToolCallType = + (typeof GoHighLevelCalendarEventCreateToolWithToolCallType)[keyof typeof GoHighLevelCalendarEventCreateToolWithToolCallType]; diff --git a/src/api/types/GoHighLevelContactCreateTool.ts b/src/api/types/GoHighLevelContactCreateTool.ts index 13827576..23788c54 100644 --- a/src/api/types/GoHighLevelContactCreateTool.ts +++ b/src/api/types/GoHighLevelContactCreateTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelContactCreateTool { /** diff --git a/src/api/types/GoHighLevelContactCreateToolMessagesItem.ts b/src/api/types/GoHighLevelContactCreateToolMessagesItem.ts index 0be2b3a7..5525f400 100644 --- a/src/api/types/GoHighLevelContactCreateToolMessagesItem.ts +++ b/src/api/types/GoHighLevelContactCreateToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoHighLevelContactCreateToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoHighLevelContactCreateToolProviderDetails.ts b/src/api/types/GoHighLevelContactCreateToolProviderDetails.ts index eebb1346..a2035a0e 100644 --- a/src/api/types/GoHighLevelContactCreateToolProviderDetails.ts +++ b/src/api/types/GoHighLevelContactCreateToolProviderDetails.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelContactCreateToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "gohighlevel.contact.create" for GoHighLevel contact create tool. */ - type: "gohighlevel.contact.create"; + type: Vapi.GoHighLevelContactCreateToolProviderDetailsType; } diff --git a/src/api/types/GoHighLevelContactCreateToolProviderDetailsType.ts b/src/api/types/GoHighLevelContactCreateToolProviderDetailsType.ts new file mode 100644 index 00000000..d97c4c83 --- /dev/null +++ b/src/api/types/GoHighLevelContactCreateToolProviderDetailsType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "gohighlevel.contact.create" for GoHighLevel contact create tool. */ +export const GoHighLevelContactCreateToolProviderDetailsType = { + GohighlevelContactCreate: "gohighlevel.contact.create", +} as const; +export type GoHighLevelContactCreateToolProviderDetailsType = + (typeof GoHighLevelContactCreateToolProviderDetailsType)[keyof typeof GoHighLevelContactCreateToolProviderDetailsType]; diff --git a/src/api/types/GoHighLevelContactCreateToolWithToolCall.ts b/src/api/types/GoHighLevelContactCreateToolWithToolCall.ts index 9670bed5..c1fe815d 100644 --- a/src/api/types/GoHighLevelContactCreateToolWithToolCall.ts +++ b/src/api/types/GoHighLevelContactCreateToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelContactCreateToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface GoHighLevelContactCreateToolWithToolCall { */ messages?: Vapi.GoHighLevelContactCreateToolWithToolCallMessagesItem[]; /** The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool. */ - type: "gohighlevel.contact.create"; + type: Vapi.GoHighLevelContactCreateToolWithToolCallType; toolCall: Vapi.ToolCall; /** * This is the plan to reject a tool call based on the conversation state. diff --git a/src/api/types/GoHighLevelContactCreateToolWithToolCallMessagesItem.ts b/src/api/types/GoHighLevelContactCreateToolWithToolCallMessagesItem.ts index ab8ee307..53e4a88c 100644 --- a/src/api/types/GoHighLevelContactCreateToolWithToolCallMessagesItem.ts +++ b/src/api/types/GoHighLevelContactCreateToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoHighLevelContactCreateToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoHighLevelContactCreateToolWithToolCallType.ts b/src/api/types/GoHighLevelContactCreateToolWithToolCallType.ts new file mode 100644 index 00000000..54347d33 --- /dev/null +++ b/src/api/types/GoHighLevelContactCreateToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool. */ +export const GoHighLevelContactCreateToolWithToolCallType = { + GohighlevelContactCreate: "gohighlevel.contact.create", +} as const; +export type GoHighLevelContactCreateToolWithToolCallType = + (typeof GoHighLevelContactCreateToolWithToolCallType)[keyof typeof GoHighLevelContactCreateToolWithToolCallType]; diff --git a/src/api/types/GoHighLevelContactGetTool.ts b/src/api/types/GoHighLevelContactGetTool.ts index ab4bf938..194983d5 100644 --- a/src/api/types/GoHighLevelContactGetTool.ts +++ b/src/api/types/GoHighLevelContactGetTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelContactGetTool { /** diff --git a/src/api/types/GoHighLevelContactGetToolMessagesItem.ts b/src/api/types/GoHighLevelContactGetToolMessagesItem.ts index 357c7793..8412032f 100644 --- a/src/api/types/GoHighLevelContactGetToolMessagesItem.ts +++ b/src/api/types/GoHighLevelContactGetToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoHighLevelContactGetToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoHighLevelContactGetToolProviderDetails.ts b/src/api/types/GoHighLevelContactGetToolProviderDetails.ts index 143f022d..3e89eae3 100644 --- a/src/api/types/GoHighLevelContactGetToolProviderDetails.ts +++ b/src/api/types/GoHighLevelContactGetToolProviderDetails.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelContactGetToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "gohighlevel.contact.get" for GoHighLevel contact get tool. */ - type: "gohighlevel.contact.get"; + type: Vapi.GoHighLevelContactGetToolProviderDetailsType; } diff --git a/src/api/types/GoHighLevelContactGetToolProviderDetailsType.ts b/src/api/types/GoHighLevelContactGetToolProviderDetailsType.ts new file mode 100644 index 00000000..9e87c086 --- /dev/null +++ b/src/api/types/GoHighLevelContactGetToolProviderDetailsType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "gohighlevel.contact.get" for GoHighLevel contact get tool. */ +export const GoHighLevelContactGetToolProviderDetailsType = { + GohighlevelContactGet: "gohighlevel.contact.get", +} as const; +export type GoHighLevelContactGetToolProviderDetailsType = + (typeof GoHighLevelContactGetToolProviderDetailsType)[keyof typeof GoHighLevelContactGetToolProviderDetailsType]; diff --git a/src/api/types/GoHighLevelContactGetToolWithToolCall.ts b/src/api/types/GoHighLevelContactGetToolWithToolCall.ts index 55519ef7..71671366 100644 --- a/src/api/types/GoHighLevelContactGetToolWithToolCall.ts +++ b/src/api/types/GoHighLevelContactGetToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelContactGetToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface GoHighLevelContactGetToolWithToolCall { */ messages?: Vapi.GoHighLevelContactGetToolWithToolCallMessagesItem[]; /** The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool. */ - type: "gohighlevel.contact.get"; + type: Vapi.GoHighLevelContactGetToolWithToolCallType; toolCall: Vapi.ToolCall; /** * This is the plan to reject a tool call based on the conversation state. diff --git a/src/api/types/GoHighLevelContactGetToolWithToolCallMessagesItem.ts b/src/api/types/GoHighLevelContactGetToolWithToolCallMessagesItem.ts index bfc1a6ec..f259a55b 100644 --- a/src/api/types/GoHighLevelContactGetToolWithToolCallMessagesItem.ts +++ b/src/api/types/GoHighLevelContactGetToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoHighLevelContactGetToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoHighLevelContactGetToolWithToolCallType.ts b/src/api/types/GoHighLevelContactGetToolWithToolCallType.ts new file mode 100644 index 00000000..afdc1e9e --- /dev/null +++ b/src/api/types/GoHighLevelContactGetToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool. */ +export const GoHighLevelContactGetToolWithToolCallType = { + GohighlevelContactGet: "gohighlevel.contact.get", +} as const; +export type GoHighLevelContactGetToolWithToolCallType = + (typeof GoHighLevelContactGetToolWithToolCallType)[keyof typeof GoHighLevelContactGetToolWithToolCallType]; diff --git a/src/api/types/GoHighLevelCredential.ts b/src/api/types/GoHighLevelCredential.ts index 0cf73536..31888299 100644 --- a/src/api/types/GoHighLevelCredential.ts +++ b/src/api/types/GoHighLevelCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface GoHighLevelCredential { - provider: "gohighlevel"; + provider: Vapi.GoHighLevelCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/GoHighLevelCredentialProvider.ts b/src/api/types/GoHighLevelCredentialProvider.ts new file mode 100644 index 00000000..42fd95ef --- /dev/null +++ b/src/api/types/GoHighLevelCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GoHighLevelCredentialProvider = { + Gohighlevel: "gohighlevel", +} as const; +export type GoHighLevelCredentialProvider = + (typeof GoHighLevelCredentialProvider)[keyof typeof GoHighLevelCredentialProvider]; diff --git a/src/api/types/GoHighLevelMcpCredential.ts b/src/api/types/GoHighLevelMcpCredential.ts index b6ba7201..35592957 100644 --- a/src/api/types/GoHighLevelMcpCredential.ts +++ b/src/api/types/GoHighLevelMcpCredential.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoHighLevelMcpCredential { - provider: "ghl.oauth2-authorization"; + provider: Vapi.GoHighLevelMcpCredentialProvider; /** This is the authentication session for the credential. */ authenticationSession: Vapi.Oauth2AuthenticationSession; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/GoHighLevelMcpCredentialProvider.ts b/src/api/types/GoHighLevelMcpCredentialProvider.ts new file mode 100644 index 00000000..22e311a2 --- /dev/null +++ b/src/api/types/GoHighLevelMcpCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GoHighLevelMcpCredentialProvider = { + GhlOauth2Authorization: "ghl.oauth2-authorization", +} as const; +export type GoHighLevelMcpCredentialProvider = + (typeof GoHighLevelMcpCredentialProvider)[keyof typeof GoHighLevelMcpCredentialProvider]; diff --git a/src/api/types/GoogleCalendarCheckAvailabilityTool.ts b/src/api/types/GoogleCalendarCheckAvailabilityTool.ts index 88c4e8d9..40371997 100644 --- a/src/api/types/GoogleCalendarCheckAvailabilityTool.ts +++ b/src/api/types/GoogleCalendarCheckAvailabilityTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleCalendarCheckAvailabilityTool { /** diff --git a/src/api/types/GoogleCalendarCheckAvailabilityToolMessagesItem.ts b/src/api/types/GoogleCalendarCheckAvailabilityToolMessagesItem.ts index 73f2589f..f4c5b73f 100644 --- a/src/api/types/GoogleCalendarCheckAvailabilityToolMessagesItem.ts +++ b/src/api/types/GoogleCalendarCheckAvailabilityToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoogleCalendarCheckAvailabilityToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoogleCalendarCreateEventTool.ts b/src/api/types/GoogleCalendarCreateEventTool.ts index 95d96f1e..d3a769e1 100644 --- a/src/api/types/GoogleCalendarCreateEventTool.ts +++ b/src/api/types/GoogleCalendarCreateEventTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleCalendarCreateEventTool { /** diff --git a/src/api/types/GoogleCalendarCreateEventToolMessagesItem.ts b/src/api/types/GoogleCalendarCreateEventToolMessagesItem.ts index 004a04e8..bab99070 100644 --- a/src/api/types/GoogleCalendarCreateEventToolMessagesItem.ts +++ b/src/api/types/GoogleCalendarCreateEventToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoogleCalendarCreateEventToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoogleCalendarCreateEventToolProviderDetails.ts b/src/api/types/GoogleCalendarCreateEventToolProviderDetails.ts index b80e33b9..404973f9 100644 --- a/src/api/types/GoogleCalendarCreateEventToolProviderDetails.ts +++ b/src/api/types/GoogleCalendarCreateEventToolProviderDetails.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleCalendarCreateEventToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "google.calendar.event.create" for Google Calendar tool. */ - type: "google.calendar.event.create"; + type: Vapi.GoogleCalendarCreateEventToolProviderDetailsType; } diff --git a/src/api/types/GoogleCalendarCreateEventToolProviderDetailsType.ts b/src/api/types/GoogleCalendarCreateEventToolProviderDetailsType.ts new file mode 100644 index 00000000..eaa9f721 --- /dev/null +++ b/src/api/types/GoogleCalendarCreateEventToolProviderDetailsType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "google.calendar.event.create" for Google Calendar tool. */ +export const GoogleCalendarCreateEventToolProviderDetailsType = { + GoogleCalendarEventCreate: "google.calendar.event.create", +} as const; +export type GoogleCalendarCreateEventToolProviderDetailsType = + (typeof GoogleCalendarCreateEventToolProviderDetailsType)[keyof typeof GoogleCalendarCreateEventToolProviderDetailsType]; diff --git a/src/api/types/GoogleCalendarCreateEventToolWithToolCall.ts b/src/api/types/GoogleCalendarCreateEventToolWithToolCall.ts index ebb59d5f..d2a5acc7 100644 --- a/src/api/types/GoogleCalendarCreateEventToolWithToolCall.ts +++ b/src/api/types/GoogleCalendarCreateEventToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleCalendarCreateEventToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface GoogleCalendarCreateEventToolWithToolCall { */ messages?: Vapi.GoogleCalendarCreateEventToolWithToolCallMessagesItem[]; /** The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool. */ - type: "google.calendar.event.create"; + type: Vapi.GoogleCalendarCreateEventToolWithToolCallType; toolCall: Vapi.ToolCall; /** * This is the plan to reject a tool call based on the conversation state. diff --git a/src/api/types/GoogleCalendarCreateEventToolWithToolCallMessagesItem.ts b/src/api/types/GoogleCalendarCreateEventToolWithToolCallMessagesItem.ts index bcb4da4f..17229751 100644 --- a/src/api/types/GoogleCalendarCreateEventToolWithToolCallMessagesItem.ts +++ b/src/api/types/GoogleCalendarCreateEventToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoogleCalendarCreateEventToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoogleCalendarCreateEventToolWithToolCallType.ts b/src/api/types/GoogleCalendarCreateEventToolWithToolCallType.ts new file mode 100644 index 00000000..d886315e --- /dev/null +++ b/src/api/types/GoogleCalendarCreateEventToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool. */ +export const GoogleCalendarCreateEventToolWithToolCallType = { + GoogleCalendarEventCreate: "google.calendar.event.create", +} as const; +export type GoogleCalendarCreateEventToolWithToolCallType = + (typeof GoogleCalendarCreateEventToolWithToolCallType)[keyof typeof GoogleCalendarCreateEventToolWithToolCallType]; diff --git a/src/api/types/GoogleCalendarOAuth2AuthorizationCredential.ts b/src/api/types/GoogleCalendarOAuth2AuthorizationCredential.ts index 268bb301..97da8101 100644 --- a/src/api/types/GoogleCalendarOAuth2AuthorizationCredential.ts +++ b/src/api/types/GoogleCalendarOAuth2AuthorizationCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface GoogleCalendarOAuth2AuthorizationCredential { - provider: "google.calendar.oauth2-authorization"; + provider: Vapi.GoogleCalendarOAuth2AuthorizationCredentialProvider; /** The authorization ID for the OAuth2 authorization */ authorizationId: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/GoogleCalendarOAuth2AuthorizationCredentialProvider.ts b/src/api/types/GoogleCalendarOAuth2AuthorizationCredentialProvider.ts new file mode 100644 index 00000000..4bd48d9b --- /dev/null +++ b/src/api/types/GoogleCalendarOAuth2AuthorizationCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GoogleCalendarOAuth2AuthorizationCredentialProvider = { + GoogleCalendarOauth2Authorization: "google.calendar.oauth2-authorization", +} as const; +export type GoogleCalendarOAuth2AuthorizationCredentialProvider = + (typeof GoogleCalendarOAuth2AuthorizationCredentialProvider)[keyof typeof GoogleCalendarOAuth2AuthorizationCredentialProvider]; diff --git a/src/api/types/GoogleCalendarOAuth2ClientCredential.ts b/src/api/types/GoogleCalendarOAuth2ClientCredential.ts index 247d2f51..c4d1e25f 100644 --- a/src/api/types/GoogleCalendarOAuth2ClientCredential.ts +++ b/src/api/types/GoogleCalendarOAuth2ClientCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface GoogleCalendarOAuth2ClientCredential { - provider: "google.calendar.oauth2-client"; + provider: Vapi.GoogleCalendarOAuth2ClientCredentialProvider; /** This is the unique identifier for the credential. */ id: string; /** This is the unique identifier for the org that this credential belongs to. */ diff --git a/src/api/types/GoogleCalendarOAuth2ClientCredentialProvider.ts b/src/api/types/GoogleCalendarOAuth2ClientCredentialProvider.ts new file mode 100644 index 00000000..d1f276ba --- /dev/null +++ b/src/api/types/GoogleCalendarOAuth2ClientCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GoogleCalendarOAuth2ClientCredentialProvider = { + GoogleCalendarOauth2Client: "google.calendar.oauth2-client", +} as const; +export type GoogleCalendarOAuth2ClientCredentialProvider = + (typeof GoogleCalendarOAuth2ClientCredentialProvider)[keyof typeof GoogleCalendarOAuth2ClientCredentialProvider]; diff --git a/src/api/types/GoogleCredential.ts b/src/api/types/GoogleCredential.ts index a262d1eb..cb0e33c4 100644 --- a/src/api/types/GoogleCredential.ts +++ b/src/api/types/GoogleCredential.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface GoogleCredential { /** This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey */ - provider: "google"; + provider: Vapi.GoogleCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/GoogleCredentialProvider.ts b/src/api/types/GoogleCredentialProvider.ts new file mode 100644 index 00000000..8b7164bf --- /dev/null +++ b/src/api/types/GoogleCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey */ +export const GoogleCredentialProvider = { + Google: "google", +} as const; +export type GoogleCredentialProvider = (typeof GoogleCredentialProvider)[keyof typeof GoogleCredentialProvider]; diff --git a/src/api/types/GoogleModel.ts b/src/api/types/GoogleModel.ts index 3ed641e3..3d027502 100644 --- a/src/api/types/GoogleModel.ts +++ b/src/api/types/GoogleModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleModel { /** This is the starting state for the conversation. */ @@ -23,7 +21,7 @@ export interface GoogleModel { knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; /** This is the Google model that will be used. */ model: Vapi.GoogleModelModel; - provider: "google"; + provider: Vapi.GoogleModelProvider; /** * This is the session configuration for the Gemini Flash 2.0 Multimodal Live API. * Only applicable if the model `gemini-2.0-flash-realtime-exp` is selected. diff --git a/src/api/types/GoogleModelModel.ts b/src/api/types/GoogleModelModel.ts index 190649d9..b78b4d3d 100644 --- a/src/api/types/GoogleModelModel.ts +++ b/src/api/types/GoogleModelModel.ts @@ -1,25 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the Google model that will be used. - */ -export type GoogleModelModel = - | "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"; +/** This is the Google model that will be used. */ export const GoogleModelModel = { Gemini25Pro: "gemini-2.5-pro", Gemini25Flash: "gemini-2.5-flash", @@ -36,3 +17,4 @@ export const GoogleModelModel = { Gemini15Pro002: "gemini-1.5-pro-002", Gemini10Pro: "gemini-1.0-pro", } as const; +export type GoogleModelModel = (typeof GoogleModelModel)[keyof typeof GoogleModelModel]; diff --git a/src/api/types/GoogleModelProvider.ts b/src/api/types/GoogleModelProvider.ts new file mode 100644 index 00000000..aac79478 --- /dev/null +++ b/src/api/types/GoogleModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GoogleModelProvider = { + Google: "google", +} as const; +export type GoogleModelProvider = (typeof GoogleModelProvider)[keyof typeof GoogleModelProvider]; diff --git a/src/api/types/GoogleModelToolsItem.ts b/src/api/types/GoogleModelToolsItem.ts index 935df320..61f5fa3f 100644 --- a/src/api/types/GoogleModelToolsItem.ts +++ b/src/api/types/GoogleModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoogleModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/GoogleRealtimeConfig.ts b/src/api/types/GoogleRealtimeConfig.ts index ad659fae..ec2b4ba4 100644 --- a/src/api/types/GoogleRealtimeConfig.ts +++ b/src/api/types/GoogleRealtimeConfig.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleRealtimeConfig { /** diff --git a/src/api/types/GoogleSheetsOAuth2AuthorizationCredential.ts b/src/api/types/GoogleSheetsOAuth2AuthorizationCredential.ts index c0bb55ac..b0db7a55 100644 --- a/src/api/types/GoogleSheetsOAuth2AuthorizationCredential.ts +++ b/src/api/types/GoogleSheetsOAuth2AuthorizationCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface GoogleSheetsOAuth2AuthorizationCredential { - provider: "google.sheets.oauth2-authorization"; + provider: Vapi.GoogleSheetsOAuth2AuthorizationCredentialProvider; /** The authorization ID for the OAuth2 authorization */ authorizationId: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/GoogleSheetsOAuth2AuthorizationCredentialProvider.ts b/src/api/types/GoogleSheetsOAuth2AuthorizationCredentialProvider.ts new file mode 100644 index 00000000..1320d571 --- /dev/null +++ b/src/api/types/GoogleSheetsOAuth2AuthorizationCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GoogleSheetsOAuth2AuthorizationCredentialProvider = { + GoogleSheetsOauth2Authorization: "google.sheets.oauth2-authorization", +} as const; +export type GoogleSheetsOAuth2AuthorizationCredentialProvider = + (typeof GoogleSheetsOAuth2AuthorizationCredentialProvider)[keyof typeof GoogleSheetsOAuth2AuthorizationCredentialProvider]; diff --git a/src/api/types/GoogleSheetsRowAppendTool.ts b/src/api/types/GoogleSheetsRowAppendTool.ts index 13532c65..c5018689 100644 --- a/src/api/types/GoogleSheetsRowAppendTool.ts +++ b/src/api/types/GoogleSheetsRowAppendTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleSheetsRowAppendTool { /** diff --git a/src/api/types/GoogleSheetsRowAppendToolMessagesItem.ts b/src/api/types/GoogleSheetsRowAppendToolMessagesItem.ts index 4fa4eb22..e3dca2a7 100644 --- a/src/api/types/GoogleSheetsRowAppendToolMessagesItem.ts +++ b/src/api/types/GoogleSheetsRowAppendToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoogleSheetsRowAppendToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoogleSheetsRowAppendToolProviderDetails.ts b/src/api/types/GoogleSheetsRowAppendToolProviderDetails.ts index b571f946..5135207b 100644 --- a/src/api/types/GoogleSheetsRowAppendToolProviderDetails.ts +++ b/src/api/types/GoogleSheetsRowAppendToolProviderDetails.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleSheetsRowAppendToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "google.sheets.row.append" for Google Sheets tool. */ - type: "google.sheets.row.append"; + type: Vapi.GoogleSheetsRowAppendToolProviderDetailsType; } diff --git a/src/api/types/GoogleSheetsRowAppendToolProviderDetailsType.ts b/src/api/types/GoogleSheetsRowAppendToolProviderDetailsType.ts new file mode 100644 index 00000000..46287a68 --- /dev/null +++ b/src/api/types/GoogleSheetsRowAppendToolProviderDetailsType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "google.sheets.row.append" for Google Sheets tool. */ +export const GoogleSheetsRowAppendToolProviderDetailsType = { + GoogleSheetsRowAppend: "google.sheets.row.append", +} as const; +export type GoogleSheetsRowAppendToolProviderDetailsType = + (typeof GoogleSheetsRowAppendToolProviderDetailsType)[keyof typeof GoogleSheetsRowAppendToolProviderDetailsType]; diff --git a/src/api/types/GoogleSheetsRowAppendToolWithToolCall.ts b/src/api/types/GoogleSheetsRowAppendToolWithToolCall.ts index e06b67c1..add57b2b 100644 --- a/src/api/types/GoogleSheetsRowAppendToolWithToolCall.ts +++ b/src/api/types/GoogleSheetsRowAppendToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleSheetsRowAppendToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface GoogleSheetsRowAppendToolWithToolCall { */ messages?: Vapi.GoogleSheetsRowAppendToolWithToolCallMessagesItem[]; /** The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool. */ - type: "google.sheets.row.append"; + type: Vapi.GoogleSheetsRowAppendToolWithToolCallType; toolCall: Vapi.ToolCall; /** * This is the plan to reject a tool call based on the conversation state. diff --git a/src/api/types/GoogleSheetsRowAppendToolWithToolCallMessagesItem.ts b/src/api/types/GoogleSheetsRowAppendToolWithToolCallMessagesItem.ts index 871fef90..43fbd1b2 100644 --- a/src/api/types/GoogleSheetsRowAppendToolWithToolCallMessagesItem.ts +++ b/src/api/types/GoogleSheetsRowAppendToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GoogleSheetsRowAppendToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/GoogleSheetsRowAppendToolWithToolCallType.ts b/src/api/types/GoogleSheetsRowAppendToolWithToolCallType.ts new file mode 100644 index 00000000..0a4a89de --- /dev/null +++ b/src/api/types/GoogleSheetsRowAppendToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool. */ +export const GoogleSheetsRowAppendToolWithToolCallType = { + GoogleSheetsRowAppend: "google.sheets.row.append", +} as const; +export type GoogleSheetsRowAppendToolWithToolCallType = + (typeof GoogleSheetsRowAppendToolWithToolCallType)[keyof typeof GoogleSheetsRowAppendToolWithToolCallType]; diff --git a/src/api/types/GoogleTranscriber.ts b/src/api/types/GoogleTranscriber.ts index 7863dc52..694c775a 100644 --- a/src/api/types/GoogleTranscriber.ts +++ b/src/api/types/GoogleTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleTranscriber { /** This is the transcription provider that will be used. */ - provider: "google"; + provider: Vapi.GoogleTranscriberProvider; /** This is the model that will be used for the transcription. */ model?: Vapi.GoogleTranscriberModel; /** This is the language that will be set for the transcription. */ diff --git a/src/api/types/GoogleTranscriberLanguage.ts b/src/api/types/GoogleTranscriberLanguage.ts index e2e983b5..185e402d 100644 --- a/src/api/types/GoogleTranscriberLanguage.ts +++ b/src/api/types/GoogleTranscriberLanguage.ts @@ -1,50 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the language that will be set for the transcription. - */ -export type GoogleTranscriberLanguage = - | "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"; +/** This is the language that will be set for the transcription. */ export const GoogleTranscriberLanguage = { Multilingual: "Multilingual", Arabic: "Arabic", @@ -86,3 +42,4 @@ export const GoogleTranscriberLanguage = { Ukrainian: "Ukrainian", Vietnamese: "Vietnamese", } as const; +export type GoogleTranscriberLanguage = (typeof GoogleTranscriberLanguage)[keyof typeof GoogleTranscriberLanguage]; diff --git a/src/api/types/GoogleTranscriberModel.ts b/src/api/types/GoogleTranscriberModel.ts index d7456845..7515829f 100644 --- a/src/api/types/GoogleTranscriberModel.ts +++ b/src/api/types/GoogleTranscriberModel.ts @@ -1,25 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used for the transcription. - */ -export type GoogleTranscriberModel = - | "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"; +/** This is the model that will be used for the transcription. */ export const GoogleTranscriberModel = { Gemini25Pro: "gemini-2.5-pro", Gemini25Flash: "gemini-2.5-flash", @@ -36,3 +17,4 @@ export const GoogleTranscriberModel = { Gemini15Pro002: "gemini-1.5-pro-002", Gemini10Pro: "gemini-1.0-pro", } as const; +export type GoogleTranscriberModel = (typeof GoogleTranscriberModel)[keyof typeof GoogleTranscriberModel]; diff --git a/src/api/types/GoogleTranscriberProvider.ts b/src/api/types/GoogleTranscriberProvider.ts new file mode 100644 index 00000000..ecbdb8fe --- /dev/null +++ b/src/api/types/GoogleTranscriberProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const GoogleTranscriberProvider = { + Google: "google", +} as const; +export type GoogleTranscriberProvider = (typeof GoogleTranscriberProvider)[keyof typeof GoogleTranscriberProvider]; diff --git a/src/api/types/GoogleVoicemailDetectionPlan.ts b/src/api/types/GoogleVoicemailDetectionPlan.ts index e14892b8..82860f7c 100644 --- a/src/api/types/GoogleVoicemailDetectionPlan.ts +++ b/src/api/types/GoogleVoicemailDetectionPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GoogleVoicemailDetectionPlan { /** @@ -18,7 +16,7 @@ export interface GoogleVoicemailDetectionPlan { */ beepMaxAwaitSeconds?: number; /** This is the provider to use for voicemail detection. */ - provider: "google"; + provider: Vapi.GoogleVoicemailDetectionPlanProvider; /** This is the backoff plan for the voicemail detection. */ backoffPlan?: Vapi.VoicemailDetectionBackoffPlan; /** diff --git a/src/api/types/GoogleVoicemailDetectionPlanProvider.ts b/src/api/types/GoogleVoicemailDetectionPlanProvider.ts new file mode 100644 index 00000000..95f72517 --- /dev/null +++ b/src/api/types/GoogleVoicemailDetectionPlanProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider to use for voicemail detection. */ +export const GoogleVoicemailDetectionPlanProvider = { + Google: "google", +} as const; +export type GoogleVoicemailDetectionPlanProvider = + (typeof GoogleVoicemailDetectionPlanProvider)[keyof typeof GoogleVoicemailDetectionPlanProvider]; diff --git a/src/api/types/GoogleVoicemailDetectionPlanType.ts b/src/api/types/GoogleVoicemailDetectionPlanType.ts index a08fd8c3..b4968c80 100644 --- a/src/api/types/GoogleVoicemailDetectionPlanType.ts +++ b/src/api/types/GoogleVoicemailDetectionPlanType.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the detection type to use for voicemail detection. @@ -8,8 +6,9 @@ * - 'transcript': Uses ASR/transcript-based detection * @default 'audio' (audio detection) */ -export type GoogleVoicemailDetectionPlanType = "audio" | "transcript"; export const GoogleVoicemailDetectionPlanType = { Audio: "audio", Transcript: "transcript", } as const; +export type GoogleVoicemailDetectionPlanType = + (typeof GoogleVoicemailDetectionPlanType)[keyof typeof GoogleVoicemailDetectionPlanType]; diff --git a/src/api/types/GroqCredential.ts b/src/api/types/GroqCredential.ts index 2bfcd252..63c8ad96 100644 --- a/src/api/types/GroqCredential.ts +++ b/src/api/types/GroqCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface GroqCredential { - provider: "groq"; + provider: Vapi.GroqCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/GroqCredentialProvider.ts b/src/api/types/GroqCredentialProvider.ts new file mode 100644 index 00000000..f1dd8e2d --- /dev/null +++ b/src/api/types/GroqCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GroqCredentialProvider = { + Groq: "groq", +} as const; +export type GroqCredentialProvider = (typeof GroqCredentialProvider)[keyof typeof GroqCredentialProvider]; diff --git a/src/api/types/GroqModel.ts b/src/api/types/GroqModel.ts index 544dff72..104872fa 100644 --- a/src/api/types/GroqModel.ts +++ b/src/api/types/GroqModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GroqModel { /** This is the starting state for the conversation. */ @@ -23,7 +21,7 @@ export interface GroqModel { knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: Vapi.GroqModelModel; - provider: "groq"; + provider: Vapi.GroqModelProvider; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ temperature?: number; /** This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. */ diff --git a/src/api/types/GroqModelModel.ts b/src/api/types/GroqModelModel.ts index ba7ba545..b13dda82 100644 --- a/src/api/types/GroqModelModel.ts +++ b/src/api/types/GroqModelModel.ts @@ -1,26 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b - */ -export type GroqModelModel = - | "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"; +/** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ export const GroqModelModel = { OpenaiGptOss20B: "openai/gpt-oss-20b", OpenaiGptOss120B: "openai/gpt-oss-120b", @@ -38,3 +18,4 @@ export const GroqModelModel = { CompoundBeta: "compound-beta", CompoundBetaMini: "compound-beta-mini", } as const; +export type GroqModelModel = (typeof GroqModelModel)[keyof typeof GroqModelModel]; diff --git a/src/api/types/GroqModelProvider.ts b/src/api/types/GroqModelProvider.ts new file mode 100644 index 00000000..df7f5d58 --- /dev/null +++ b/src/api/types/GroqModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GroqModelProvider = { + Groq: "groq", +} as const; +export type GroqModelProvider = (typeof GroqModelProvider)[keyof typeof GroqModelProvider]; diff --git a/src/api/types/GroqModelToolsItem.ts b/src/api/types/GroqModelToolsItem.ts index cce6ae7f..0b8c3f0e 100644 --- a/src/api/types/GroqModelToolsItem.ts +++ b/src/api/types/GroqModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GroqModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/GroupCondition.ts b/src/api/types/GroupCondition.ts index 4b310b09..892fb733 100644 --- a/src/api/types/GroupCondition.ts +++ b/src/api/types/GroupCondition.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface GroupCondition { /** This is the type discriminator for group condition */ - type: "group"; + type: Vapi.GroupConditionType; /** This is the logical operator for combining conditions in this group */ operator: Vapi.GroupConditionOperator; /** diff --git a/src/api/types/GroupConditionConditionsItem.ts b/src/api/types/GroupConditionConditionsItem.ts index 8dae1296..c366bb77 100644 --- a/src/api/types/GroupConditionConditionsItem.ts +++ b/src/api/types/GroupConditionConditionsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type GroupConditionConditionsItem = | Vapi.RegexCondition diff --git a/src/api/types/GroupConditionOperator.ts b/src/api/types/GroupConditionOperator.ts index 39bb486a..7f4c88c0 100644 --- a/src/api/types/GroupConditionOperator.ts +++ b/src/api/types/GroupConditionOperator.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the logical operator for combining conditions in this group - */ -export type GroupConditionOperator = "AND" | "OR"; +/** This is the logical operator for combining conditions in this group */ export const GroupConditionOperator = { And: "AND", Or: "OR", } as const; +export type GroupConditionOperator = (typeof GroupConditionOperator)[keyof typeof GroupConditionOperator]; diff --git a/src/api/types/GroupConditionType.ts b/src/api/types/GroupConditionType.ts new file mode 100644 index 00000000..aa22e462 --- /dev/null +++ b/src/api/types/GroupConditionType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type discriminator for group condition */ +export const GroupConditionType = { + Group: "group", +} as const; +export type GroupConditionType = (typeof GroupConditionType)[keyof typeof GroupConditionType]; diff --git a/src/api/types/HandoffDestinationAssistant.ts b/src/api/types/HandoffDestinationAssistant.ts index 293a06ea..a20e4eda 100644 --- a/src/api/types/HandoffDestinationAssistant.ts +++ b/src/api/types/HandoffDestinationAssistant.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface HandoffDestinationAssistant { - type: "assistant"; + type: Vapi.HandoffDestinationAssistantType; /** This is the plan for manipulating the message context before handing off the call to the next assistant. */ contextEngineeringPlan?: Vapi.HandoffDestinationAssistantContextEngineeringPlan; /** This is the assistant to transfer the call to. You must provide either assistantName or assistantId. */ @@ -16,6 +14,8 @@ export interface HandoffDestinationAssistant { assistant?: Vapi.CreateAssistantDto; /** This is the variable extraction plan for the handoff tool. */ variableExtractionPlan?: Vapi.VariableExtractionPlan; + /** These are the assistant overrides to apply to the destination assistant. */ + assistantOverrides?: Vapi.AssistantOverrides; /** This is the description of the destination, used by the AI to choose when and how to transfer the call. */ description?: string; } diff --git a/src/api/types/HandoffDestinationAssistantContextEngineeringPlan.ts b/src/api/types/HandoffDestinationAssistantContextEngineeringPlan.ts index 86fd5bd8..517151ab 100644 --- a/src/api/types/HandoffDestinationAssistantContextEngineeringPlan.ts +++ b/src/api/types/HandoffDestinationAssistantContextEngineeringPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the plan for manipulating the message context before handing off the call to the next assistant. diff --git a/src/api/types/HandoffDestinationAssistantType.ts b/src/api/types/HandoffDestinationAssistantType.ts new file mode 100644 index 00000000..0ed6fd24 --- /dev/null +++ b/src/api/types/HandoffDestinationAssistantType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const HandoffDestinationAssistantType = { + Assistant: "assistant", +} as const; +export type HandoffDestinationAssistantType = + (typeof HandoffDestinationAssistantType)[keyof typeof HandoffDestinationAssistantType]; diff --git a/src/api/types/HandoffDestinationDynamic.ts b/src/api/types/HandoffDestinationDynamic.ts index 13e1745b..cf40c664 100644 --- a/src/api/types/HandoffDestinationDynamic.ts +++ b/src/api/types/HandoffDestinationDynamic.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface HandoffDestinationDynamic { - type: "dynamic"; + type: Vapi.HandoffDestinationDynamicType; /** * This is where Vapi will send the handoff-destination-request webhook in a dynamic handoff. * diff --git a/src/api/types/HandoffDestinationDynamicType.ts b/src/api/types/HandoffDestinationDynamicType.ts new file mode 100644 index 00000000..86b173dd --- /dev/null +++ b/src/api/types/HandoffDestinationDynamicType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const HandoffDestinationDynamicType = { + Dynamic: "dynamic", +} as const; +export type HandoffDestinationDynamicType = + (typeof HandoffDestinationDynamicType)[keyof typeof HandoffDestinationDynamicType]; diff --git a/src/api/types/HandoffTool.ts b/src/api/types/HandoffTool.ts index a5335b3d..f4d2eeed 100644 --- a/src/api/types/HandoffTool.ts +++ b/src/api/types/HandoffTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface HandoffTool { /** diff --git a/src/api/types/HandoffToolDestinationsItem.ts b/src/api/types/HandoffToolDestinationsItem.ts index 597dac31..0a3b446b 100644 --- a/src/api/types/HandoffToolDestinationsItem.ts +++ b/src/api/types/HandoffToolDestinationsItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type HandoffToolDestinationsItem = Vapi.HandoffDestinationAssistant | Vapi.HandoffDestinationDynamic; diff --git a/src/api/types/HandoffToolMessagesItem.ts b/src/api/types/HandoffToolMessagesItem.ts index 7250d552..ecad5475 100644 --- a/src/api/types/HandoffToolMessagesItem.ts +++ b/src/api/types/HandoffToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type HandoffToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/HangupNode.ts b/src/api/types/HangupNode.ts index 04e6afcc..62051330 100644 --- a/src/api/types/HangupNode.ts +++ b/src/api/types/HangupNode.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface HangupNode { - type: "hangup"; + type: Vapi.HangupNodeType; name: string; /** This is whether or not the node is the start of the workflow. */ isStart?: boolean; diff --git a/src/api/types/HangupNodeType.ts b/src/api/types/HangupNodeType.ts new file mode 100644 index 00000000..7970a49e --- /dev/null +++ b/src/api/types/HangupNodeType.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const HangupNodeType = { + Hangup: "hangup", +} as const; +export type HangupNodeType = (typeof HangupNodeType)[keyof typeof HangupNodeType]; diff --git a/src/api/types/HmacAuthenticationPlan.ts b/src/api/types/HmacAuthenticationPlan.ts index 6316df3a..bc171887 100644 --- a/src/api/types/HmacAuthenticationPlan.ts +++ b/src/api/types/HmacAuthenticationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface HmacAuthenticationPlan { type: "hmac"; diff --git a/src/api/types/HmacAuthenticationPlanAlgorithm.ts b/src/api/types/HmacAuthenticationPlanAlgorithm.ts index 8071cc75..24858c34 100644 --- a/src/api/types/HmacAuthenticationPlanAlgorithm.ts +++ b/src/api/types/HmacAuthenticationPlanAlgorithm.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the HMAC algorithm to use for signing. - */ -export type HmacAuthenticationPlanAlgorithm = "sha256" | "sha512" | "sha1"; +/** This is the HMAC algorithm to use for signing. */ export const HmacAuthenticationPlanAlgorithm = { Sha256: "sha256", Sha512: "sha512", Sha1: "sha1", } as const; +export type HmacAuthenticationPlanAlgorithm = + (typeof HmacAuthenticationPlanAlgorithm)[keyof typeof HmacAuthenticationPlanAlgorithm]; diff --git a/src/api/types/HmacAuthenticationPlanSignatureEncoding.ts b/src/api/types/HmacAuthenticationPlanSignatureEncoding.ts index b32e8135..0d26bd25 100644 --- a/src/api/types/HmacAuthenticationPlanSignatureEncoding.ts +++ b/src/api/types/HmacAuthenticationPlanSignatureEncoding.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The encoding format for the signature. Defaults to 'hex'. - */ -export type HmacAuthenticationPlanSignatureEncoding = "hex" | "base64"; +/** The encoding format for the signature. Defaults to 'hex'. */ export const HmacAuthenticationPlanSignatureEncoding = { Hex: "hex", Base64: "base64", } as const; +export type HmacAuthenticationPlanSignatureEncoding = + (typeof HmacAuthenticationPlanSignatureEncoding)[keyof typeof HmacAuthenticationPlanSignatureEncoding]; diff --git a/src/api/types/HumeCredential.ts b/src/api/types/HumeCredential.ts index 38cfc6cc..c51799b5 100644 --- a/src/api/types/HumeCredential.ts +++ b/src/api/types/HumeCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface HumeCredential { - provider: "hume"; + provider: Vapi.HumeCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/HumeCredentialProvider.ts b/src/api/types/HumeCredentialProvider.ts new file mode 100644 index 00000000..1f51853f --- /dev/null +++ b/src/api/types/HumeCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const HumeCredentialProvider = { + Hume: "hume", +} as const; +export type HumeCredentialProvider = (typeof HumeCredentialProvider)[keyof typeof HumeCredentialProvider]; diff --git a/src/api/types/HumeVoice.ts b/src/api/types/HumeVoice.ts index 038827a2..c3c87eb2 100644 --- a/src/api/types/HumeVoice.ts +++ b/src/api/types/HumeVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface HumeVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "hume"; + provider: Vapi.HumeVoiceProvider; /** This is the model that will be used. */ model?: Vapi.HumeVoiceModel; /** The ID of the particular voice you want to use. */ diff --git a/src/api/types/HumeVoiceModel.ts b/src/api/types/HumeVoiceModel.ts index 5bbf2bc3..f14c0345 100644 --- a/src/api/types/HumeVoiceModel.ts +++ b/src/api/types/HumeVoiceModel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. - */ -export type HumeVoiceModel = "octave" | "octave2"; +/** This is the model that will be used. */ export const HumeVoiceModel = { Octave: "octave", Octave2: "octave2", } as const; +export type HumeVoiceModel = (typeof HumeVoiceModel)[keyof typeof HumeVoiceModel]; diff --git a/src/api/types/HumeVoiceProvider.ts b/src/api/types/HumeVoiceProvider.ts new file mode 100644 index 00000000..f25c793f --- /dev/null +++ b/src/api/types/HumeVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const HumeVoiceProvider = { + Hume: "hume", +} as const; +export type HumeVoiceProvider = (typeof HumeVoiceProvider)[keyof typeof HumeVoiceProvider]; diff --git a/src/api/types/ImportTwilioPhoneNumberDto.ts b/src/api/types/ImportTwilioPhoneNumberDto.ts index e928526b..e8eb8e88 100644 --- a/src/api/types/ImportTwilioPhoneNumberDto.ts +++ b/src/api/types/ImportTwilioPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ImportTwilioPhoneNumberDto { /** diff --git a/src/api/types/ImportTwilioPhoneNumberDtoFallbackDestination.ts b/src/api/types/ImportTwilioPhoneNumberDtoFallbackDestination.ts index ba41f54c..5054a0ca 100644 --- a/src/api/types/ImportTwilioPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/ImportTwilioPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/ImportTwilioPhoneNumberDtoHooksItem.ts b/src/api/types/ImportTwilioPhoneNumberDtoHooksItem.ts index eb29345c..84957135 100644 --- a/src/api/types/ImportTwilioPhoneNumberDtoHooksItem.ts +++ b/src/api/types/ImportTwilioPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ImportTwilioPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/ImportVonagePhoneNumberDto.ts b/src/api/types/ImportVonagePhoneNumberDto.ts index 62bf062b..f0be8bcf 100644 --- a/src/api/types/ImportVonagePhoneNumberDto.ts +++ b/src/api/types/ImportVonagePhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ImportVonagePhoneNumberDto { /** diff --git a/src/api/types/ImportVonagePhoneNumberDtoFallbackDestination.ts b/src/api/types/ImportVonagePhoneNumberDtoFallbackDestination.ts index e84ad20e..b69bb261 100644 --- a/src/api/types/ImportVonagePhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/ImportVonagePhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/ImportVonagePhoneNumberDtoHooksItem.ts b/src/api/types/ImportVonagePhoneNumberDtoHooksItem.ts index a1039000..da0367b1 100644 --- a/src/api/types/ImportVonagePhoneNumberDtoHooksItem.ts +++ b/src/api/types/ImportVonagePhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ImportVonagePhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/InflectionAiCredential.ts b/src/api/types/InflectionAiCredential.ts index f826c233..797dadee 100644 --- a/src/api/types/InflectionAiCredential.ts +++ b/src/api/types/InflectionAiCredential.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface InflectionAiCredential { /** 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 */ - provider: "inflection-ai"; + provider: Vapi.InflectionAiCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/InflectionAiCredentialProvider.ts b/src/api/types/InflectionAiCredentialProvider.ts new file mode 100644 index 00000000..f81eda8d --- /dev/null +++ b/src/api/types/InflectionAiCredentialProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** 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 */ +export const InflectionAiCredentialProvider = { + InflectionAi: "inflection-ai", +} as const; +export type InflectionAiCredentialProvider = + (typeof InflectionAiCredentialProvider)[keyof typeof InflectionAiCredentialProvider]; diff --git a/src/api/types/InflectionAiModel.ts b/src/api/types/InflectionAiModel.ts index 6e0a20aa..93b075af 100644 --- a/src/api/types/InflectionAiModel.ts +++ b/src/api/types/InflectionAiModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface InflectionAiModel { /** This is the starting state for the conversation. */ @@ -22,8 +20,8 @@ export interface InflectionAiModel { /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ - model: "inflection_3_pi"; - provider: "inflection-ai"; + model: Vapi.InflectionAiModelModel; + provider: Vapi.InflectionAiModelProvider; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ temperature?: number; /** This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. */ diff --git a/src/api/types/InflectionAiModelModel.ts b/src/api/types/InflectionAiModelModel.ts new file mode 100644 index 00000000..2b1f6e3c --- /dev/null +++ b/src/api/types/InflectionAiModelModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ +export const InflectionAiModelModel = { + Inflection3Pi: "inflection_3_pi", +} as const; +export type InflectionAiModelModel = (typeof InflectionAiModelModel)[keyof typeof InflectionAiModelModel]; diff --git a/src/api/types/InflectionAiModelProvider.ts b/src/api/types/InflectionAiModelProvider.ts new file mode 100644 index 00000000..8977c93f --- /dev/null +++ b/src/api/types/InflectionAiModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const InflectionAiModelProvider = { + InflectionAi: "inflection-ai", +} as const; +export type InflectionAiModelProvider = (typeof InflectionAiModelProvider)[keyof typeof InflectionAiModelProvider]; diff --git a/src/api/types/InflectionAiModelToolsItem.ts b/src/api/types/InflectionAiModelToolsItem.ts index 15fa103c..cc60557e 100644 --- a/src/api/types/InflectionAiModelToolsItem.ts +++ b/src/api/types/InflectionAiModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type InflectionAiModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/Insight.ts b/src/api/types/Insight.ts new file mode 100644 index 00000000..16553414 --- /dev/null +++ b/src/api/types/Insight.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface Insight { + /** This is the name of the Insight. */ + name?: string; + /** This is the type of the Insight. */ + type: Vapi.InsightType; + /** This is the unique identifier for the Insight. */ + id: string; + /** This is the unique identifier for the org that this Insight belongs to. */ + orgId: string; + /** This is the ISO 8601 date-time string of when the Insight was created. */ + createdAt: string; + /** This is the ISO 8601 date-time string of when the Insight was last updated. */ + updatedAt: string; +} diff --git a/src/api/types/InsightFormula.ts b/src/api/types/InsightFormula.ts new file mode 100644 index 00000000..7f5604c2 --- /dev/null +++ b/src/api/types/InsightFormula.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface InsightFormula { + /** + * This is the name of the formula. + * It will be used to label the formula in the insight board on the UI. + */ + name?: string; + /** + * 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 +, -, *, /, % + */ + formula: string; +} diff --git a/src/api/types/InsightPaginatedResponse.ts b/src/api/types/InsightPaginatedResponse.ts new file mode 100644 index 00000000..66bb4c8a --- /dev/null +++ b/src/api/types/InsightPaginatedResponse.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface InsightPaginatedResponse { + results: Vapi.Insight[]; + metadata: Vapi.PaginationMeta; +} diff --git a/src/api/types/InsightRunFormatPlan.ts b/src/api/types/InsightRunFormatPlan.ts new file mode 100644 index 00000000..c1efcd16 --- /dev/null +++ b/src/api/types/InsightRunFormatPlan.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface InsightRunFormatPlan { + /** + * 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. + */ + format?: Vapi.InsightRunFormatPlanFormat; +} diff --git a/src/api/types/InsightRunFormatPlanFormat.ts b/src/api/types/InsightRunFormatPlanFormat.ts new file mode 100644 index 00000000..01fa5273 --- /dev/null +++ b/src/api/types/InsightRunFormatPlanFormat.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const InsightRunFormatPlanFormat = { + Raw: "raw", + Recharts: "recharts", +} as const; +export type InsightRunFormatPlanFormat = (typeof InsightRunFormatPlanFormat)[keyof typeof InsightRunFormatPlanFormat]; diff --git a/src/api/types/InsightRunResponse.ts b/src/api/types/InsightRunResponse.ts new file mode 100644 index 00000000..f87c3ab9 --- /dev/null +++ b/src/api/types/InsightRunResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface InsightRunResponse { + id: string; + insightId: string; + orgId: string; + createdAt: string; + updatedAt: string; +} diff --git a/src/api/types/InsightTimeRange.ts b/src/api/types/InsightTimeRange.ts new file mode 100644 index 00000000..df233393 --- /dev/null +++ b/src/api/types/InsightTimeRange.ts @@ -0,0 +1,42 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface InsightTimeRange { + /** + * 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 + */ + start?: Record; + /** + * 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 + */ + end?: Record; + /** + * This is the timezone you want to set for the query. + * + * If not provided, defaults to UTC. + */ + timezone?: string; +} diff --git a/src/api/types/InsightTimeRangeWithStep.ts b/src/api/types/InsightTimeRangeWithStep.ts new file mode 100644 index 00000000..1631fc7e --- /dev/null +++ b/src/api/types/InsightTimeRangeWithStep.ts @@ -0,0 +1,50 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface InsightTimeRangeWithStep { + /** + * This is the group by step for aggregation. + * + * If not provided, defaults to group by day. + */ + step?: Vapi.InsightTimeRangeWithStepStep; + /** + * 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 + */ + start?: Record; + /** + * 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 + */ + end?: Record; + /** + * This is the timezone you want to set for the query. + * + * If not provided, defaults to UTC. + */ + timezone?: string; +} diff --git a/src/api/types/InsightTimeRangeWithStepStep.ts b/src/api/types/InsightTimeRangeWithStepStep.ts new file mode 100644 index 00000000..35390b4a --- /dev/null +++ b/src/api/types/InsightTimeRangeWithStepStep.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by step for aggregation. + * + * If not provided, defaults to group by day. + */ +export const InsightTimeRangeWithStepStep = { + Minute: "minute", + Hour: "hour", + Day: "day", + Week: "week", + Month: "month", + Quarter: "quarter", + Year: "year", +} as const; +export type InsightTimeRangeWithStepStep = + (typeof InsightTimeRangeWithStepStep)[keyof typeof InsightTimeRangeWithStepStep]; diff --git a/src/api/types/InsightType.ts b/src/api/types/InsightType.ts new file mode 100644 index 00000000..d0f13260 --- /dev/null +++ b/src/api/types/InsightType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the Insight. */ +export const InsightType = { + Bar: "bar", + Line: "line", + Pie: "pie", + Text: "text", +} as const; +export type InsightType = (typeof InsightType)[keyof typeof InsightType]; diff --git a/src/api/types/InviteUserDto.ts b/src/api/types/InviteUserDto.ts index 176c3cb7..a4d5ea6c 100644 --- a/src/api/types/InviteUserDto.ts +++ b/src/api/types/InviteUserDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface InviteUserDto { emails: string[]; diff --git a/src/api/types/InviteUserDtoRole.ts b/src/api/types/InviteUserDtoRole.ts index 5db6a965..08ed6215 100644 --- a/src/api/types/InviteUserDtoRole.ts +++ b/src/api/types/InviteUserDtoRole.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type InviteUserDtoRole = "admin" | "editor" | "viewer"; export const InviteUserDtoRole = { Admin: "admin", Editor: "editor", Viewer: "viewer", } as const; +export type InviteUserDtoRole = (typeof InviteUserDtoRole)[keyof typeof InviteUserDtoRole]; diff --git a/src/api/types/InvoicePlan.ts b/src/api/types/InvoicePlan.ts index 32cf5fb3..ce6df601 100644 --- a/src/api/types/InvoicePlan.ts +++ b/src/api/types/InvoicePlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface InvoicePlan { /** This is the name of the company. */ diff --git a/src/api/types/InworldCredential.ts b/src/api/types/InworldCredential.ts index c90b4960..2cc861df 100644 --- a/src/api/types/InworldCredential.ts +++ b/src/api/types/InworldCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface InworldCredential { - provider: "inworld"; + provider: Vapi.InworldCredentialProvider; /** This is the Inworld Basic (Base64) authentication token. This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/InworldCredentialProvider.ts b/src/api/types/InworldCredentialProvider.ts new file mode 100644 index 00000000..6e32722a --- /dev/null +++ b/src/api/types/InworldCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const InworldCredentialProvider = { + Inworld: "inworld", +} as const; +export type InworldCredentialProvider = (typeof InworldCredentialProvider)[keyof typeof InworldCredentialProvider]; diff --git a/src/api/types/InworldVoice.ts b/src/api/types/InworldVoice.ts index 621db0c4..bd73355d 100644 --- a/src/api/types/InworldVoice.ts +++ b/src/api/types/InworldVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface InworldVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "inworld"; + provider: Vapi.InworldVoiceProvider; /** * Available voices by language: * • en: Alex, Ashley, Craig, Deborah, Dennis, Edward, Elizabeth, Hades, Julia, Pixie, Mark, Olivia, Priya, Ronald, Sarah, Shaun, Theodore, Timothy, Wendy, Dominus @@ -25,7 +23,7 @@ export interface InworldVoice { */ voiceId: Vapi.InworldVoiceVoiceId; /** This is the model that will be used. */ - model?: "inworld-tts-1"; + model?: Vapi.InworldVoiceModel; /** Language code for Inworld TTS synthesis */ languageCode?: Vapi.InworldVoiceLanguageCode; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/InworldVoiceLanguageCode.ts b/src/api/types/InworldVoiceLanguageCode.ts index 4533662b..1c695577 100644 --- a/src/api/types/InworldVoiceLanguageCode.ts +++ b/src/api/types/InworldVoiceLanguageCode.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Language code for Inworld TTS synthesis - */ -export type InworldVoiceLanguageCode = "en" | "zh" | "ko" | "nl" | "fr" | "es" | "ja" | "de" | "it" | "pl" | "pt"; +/** Language code for Inworld TTS synthesis */ export const InworldVoiceLanguageCode = { En: "en", Zh: "zh", @@ -19,3 +14,4 @@ export const InworldVoiceLanguageCode = { Pl: "pl", Pt: "pt", } as const; +export type InworldVoiceLanguageCode = (typeof InworldVoiceLanguageCode)[keyof typeof InworldVoiceLanguageCode]; diff --git a/src/api/types/InworldVoiceModel.ts b/src/api/types/InworldVoiceModel.ts new file mode 100644 index 00000000..61e43ecb --- /dev/null +++ b/src/api/types/InworldVoiceModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used. */ +export const InworldVoiceModel = { + InworldTts1: "inworld-tts-1", +} as const; +export type InworldVoiceModel = (typeof InworldVoiceModel)[keyof typeof InworldVoiceModel]; diff --git a/src/api/types/InworldVoiceProvider.ts b/src/api/types/InworldVoiceProvider.ts new file mode 100644 index 00000000..30e1f79c --- /dev/null +++ b/src/api/types/InworldVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const InworldVoiceProvider = { + Inworld: "inworld", +} as const; +export type InworldVoiceProvider = (typeof InworldVoiceProvider)[keyof typeof InworldVoiceProvider]; diff --git a/src/api/types/InworldVoiceVoiceId.ts b/src/api/types/InworldVoiceVoiceId.ts index 678a19a8..636e1db7 100644 --- a/src/api/types/InworldVoiceVoiceId.ts +++ b/src/api/types/InworldVoiceVoiceId.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Available voices by language: @@ -16,57 +14,6 @@ * • pt: Heitor, Maitê * • es: Diego, Lupita, Miguel, Rafael */ -export type InworldVoiceVoiceId = - | "Alex" - | "Ashley" - | "Craig" - | "Deborah" - | "Dennis" - | "Edward" - | "Elizabeth" - | "Hades" - | "Julia" - | "Pixie" - | "Mark" - | "Olivia" - | "Priya" - | "Ronald" - | "Sarah" - | "Shaun" - | "Theodore" - | "Timothy" - | "Wendy" - | "Dominus" - | "Yichen" - | "Xiaoyin" - | "Xinyi" - | "Jing" - | "Erik" - | "Katrien" - | "Lennart" - | "Lore" - | "Alain" - | "H\u00E9l\u00E8ne" - | "Mathieu" - | "\u00C9tienne" - | "Johanna" - | "Josef" - | "Gianni" - | "Orietta" - | "Asuka" - | "Satoshi" - | "Hyunwoo" - | "Minji" - | "Seojun" - | "Yoona" - | "Szymon" - | "Wojciech" - | "Heitor" - | "Mait\u00EA" - | "Diego" - | "Lupita" - | "Miguel" - | "Rafael"; export const InworldVoiceVoiceId = { Alex: "Alex", Ashley: "Ashley", @@ -119,3 +66,4 @@ export const InworldVoiceVoiceId = { Miguel: "Miguel", Rafael: "Rafael", } as const; +export type InworldVoiceVoiceId = (typeof InworldVoiceVoiceId)[keyof typeof InworldVoiceVoiceId]; diff --git a/src/api/types/JsonQueryOnCallTableWithNumberTypeColumn.ts b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumn.ts new file mode 100644 index 00000000..4efbb1cb --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumn.ts @@ -0,0 +1,35 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface JsonQueryOnCallTableWithNumberTypeColumn { + /** This is the type of query. Only allowed type is "vapiql-json". */ + type: Vapi.JsonQueryOnCallTableWithNumberTypeColumnType; + /** This is the table that will be queried. */ + table: Vapi.JsonQueryOnCallTableWithNumberTypeColumnTable; + /** + * This is the filters to apply to the insight. + * The discriminator automatically selects the correct filter type based on column and operator. + */ + filters?: Vapi.JsonQueryOnCallTableWithNumberTypeColumnFiltersItem[]; + /** + * 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 + */ + column: Vapi.JsonQueryOnCallTableWithNumberTypeColumnColumn; + /** + * 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 + */ + operation: Vapi.JsonQueryOnCallTableWithNumberTypeColumnOperation; + /** + * This is the name of the query. + * It will be used to label the query in the insight board on the UI. + */ + name?: string; +} diff --git a/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnColumn.ts b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnColumn.ts new file mode 100644 index 00000000..c4b07478 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnColumn.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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 + */ +export const JsonQueryOnCallTableWithNumberTypeColumnColumn = { + Cost: "cost", + Duration: "duration", + AverageModelLatency: "averageModelLatency", + AverageVoiceLatency: "averageVoiceLatency", + AverageTranscriberLatency: "averageTranscriberLatency", + AverageTurnLatency: "averageTurnLatency", + AverageEndpointingLatency: "averageEndpointingLatency", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type JsonQueryOnCallTableWithNumberTypeColumnColumn = + (typeof JsonQueryOnCallTableWithNumberTypeColumnColumn)[keyof typeof JsonQueryOnCallTableWithNumberTypeColumnColumn]; diff --git a/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnFiltersItem.ts b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnFiltersItem.ts new file mode 100644 index 00000000..25df6884 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnFiltersItem.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type JsonQueryOnCallTableWithNumberTypeColumnFiltersItem = + | Vapi.FilterStringTypeColumnOnCallTable + | Vapi.FilterStringArrayTypeColumnOnCallTable + | Vapi.FilterNumberTypeColumnOnCallTable + | Vapi.FilterNumberArrayTypeColumnOnCallTable + | Vapi.FilterDateTypeColumnOnCallTable + | Vapi.FilterStructuredOutputColumnOnCallTable; diff --git a/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnOperation.ts b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnOperation.ts new file mode 100644 index 00000000..e859b1ee --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnOperation.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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 + */ +export const JsonQueryOnCallTableWithNumberTypeColumnOperation = { + Average: "average", + Sum: "sum", + Min: "min", + Max: "max", +} as const; +export type JsonQueryOnCallTableWithNumberTypeColumnOperation = + (typeof JsonQueryOnCallTableWithNumberTypeColumnOperation)[keyof typeof JsonQueryOnCallTableWithNumberTypeColumnOperation]; diff --git a/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnTable.ts b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnTable.ts new file mode 100644 index 00000000..fa1d0489 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnTable.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the table that will be queried. */ +export const JsonQueryOnCallTableWithNumberTypeColumnTable = { + Call: "call", +} as const; +export type JsonQueryOnCallTableWithNumberTypeColumnTable = + (typeof JsonQueryOnCallTableWithNumberTypeColumnTable)[keyof typeof JsonQueryOnCallTableWithNumberTypeColumnTable]; diff --git a/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnType.ts b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnType.ts new file mode 100644 index 00000000..f807dcbf --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithNumberTypeColumnType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of query. Only allowed type is "vapiql-json". */ +export const JsonQueryOnCallTableWithNumberTypeColumnType = { + VapiqlJson: "vapiql-json", +} as const; +export type JsonQueryOnCallTableWithNumberTypeColumnType = + (typeof JsonQueryOnCallTableWithNumberTypeColumnType)[keyof typeof JsonQueryOnCallTableWithNumberTypeColumnType]; diff --git a/src/api/types/JsonQueryOnCallTableWithStringTypeColumn.ts b/src/api/types/JsonQueryOnCallTableWithStringTypeColumn.ts new file mode 100644 index 00000000..425b4549 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStringTypeColumn.ts @@ -0,0 +1,31 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface JsonQueryOnCallTableWithStringTypeColumn { + /** This is the type of query. Only allowed type is "vapiql-json". */ + type: Vapi.JsonQueryOnCallTableWithStringTypeColumnType; + /** This is the table that will be queried. */ + table: Vapi.JsonQueryOnCallTableWithStringTypeColumnTable; + /** + * This is the filters to apply to the insight. + * The discriminator automatically selects the correct filter type based on column and operator. + */ + filters?: Vapi.JsonQueryOnCallTableWithStringTypeColumnFiltersItem[]; + /** + * 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 + */ + column: Vapi.JsonQueryOnCallTableWithStringTypeColumnColumn; + /** + * This is the aggregation operation to perform on the column. + * When the column is a string type, the operation must be "count". + */ + operation: Vapi.JsonQueryOnCallTableWithStringTypeColumnOperation; + /** + * This is the name of the query. + * It will be used to label the query in the insight board on the UI. + */ + name?: string; +} diff --git a/src/api/types/JsonQueryOnCallTableWithStringTypeColumnColumn.ts b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnColumn.ts new file mode 100644 index 00000000..13bb4cc7 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnColumn.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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 + */ +export const JsonQueryOnCallTableWithStringTypeColumnColumn = { + Id: "id", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type JsonQueryOnCallTableWithStringTypeColumnColumn = + (typeof JsonQueryOnCallTableWithStringTypeColumnColumn)[keyof typeof JsonQueryOnCallTableWithStringTypeColumnColumn]; diff --git a/src/api/types/JsonQueryOnCallTableWithStringTypeColumnFiltersItem.ts b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnFiltersItem.ts new file mode 100644 index 00000000..22bcb657 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnFiltersItem.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type JsonQueryOnCallTableWithStringTypeColumnFiltersItem = + | Vapi.FilterStringTypeColumnOnCallTable + | Vapi.FilterStringArrayTypeColumnOnCallTable + | Vapi.FilterNumberTypeColumnOnCallTable + | Vapi.FilterNumberArrayTypeColumnOnCallTable + | Vapi.FilterDateTypeColumnOnCallTable + | Vapi.FilterStructuredOutputColumnOnCallTable; diff --git a/src/api/types/JsonQueryOnCallTableWithStringTypeColumnOperation.ts b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnOperation.ts new file mode 100644 index 00000000..dca2e4c3 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnOperation.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the aggregation operation to perform on the column. + * When the column is a string type, the operation must be "count". + */ +export const JsonQueryOnCallTableWithStringTypeColumnOperation = { + Count: "count", +} as const; +export type JsonQueryOnCallTableWithStringTypeColumnOperation = + (typeof JsonQueryOnCallTableWithStringTypeColumnOperation)[keyof typeof JsonQueryOnCallTableWithStringTypeColumnOperation]; diff --git a/src/api/types/JsonQueryOnCallTableWithStringTypeColumnTable.ts b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnTable.ts new file mode 100644 index 00000000..e778a9c0 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnTable.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the table that will be queried. */ +export const JsonQueryOnCallTableWithStringTypeColumnTable = { + Call: "call", +} as const; +export type JsonQueryOnCallTableWithStringTypeColumnTable = + (typeof JsonQueryOnCallTableWithStringTypeColumnTable)[keyof typeof JsonQueryOnCallTableWithStringTypeColumnTable]; diff --git a/src/api/types/JsonQueryOnCallTableWithStringTypeColumnType.ts b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnType.ts new file mode 100644 index 00000000..d74cce84 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStringTypeColumnType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of query. Only allowed type is "vapiql-json". */ +export const JsonQueryOnCallTableWithStringTypeColumnType = { + VapiqlJson: "vapiql-json", +} as const; +export type JsonQueryOnCallTableWithStringTypeColumnType = + (typeof JsonQueryOnCallTableWithStringTypeColumnType)[keyof typeof JsonQueryOnCallTableWithStringTypeColumnType]; diff --git a/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumn.ts b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumn.ts new file mode 100644 index 00000000..3acaedd4 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumn.ts @@ -0,0 +1,32 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface JsonQueryOnCallTableWithStructuredOutputColumn { + /** This is the type of query. Only allowed type is "vapiql-json". */ + type: Vapi.JsonQueryOnCallTableWithStructuredOutputColumnType; + /** This is the table that will be queried. */ + table: Vapi.JsonQueryOnCallTableWithStructuredOutputColumnTable; + /** + * This is the filters to apply to the insight. + * The discriminator automatically selects the correct filter type based on column and operator. + */ + filters?: Vapi.JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem[]; + /** + * 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. + */ + column: Vapi.JsonQueryOnCallTableWithStructuredOutputColumnColumn; + /** + * 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". + */ + operation: Vapi.JsonQueryOnCallTableWithStructuredOutputColumnOperation; + /** + * This is the name of the query. + * It will be used to label the query in the insight board on the UI. + */ + name?: string; +} diff --git a/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnColumn.ts b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnColumn.ts new file mode 100644 index 00000000..a5ee36d0 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnColumn.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const JsonQueryOnCallTableWithStructuredOutputColumnColumn = { + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type JsonQueryOnCallTableWithStructuredOutputColumnColumn = + (typeof JsonQueryOnCallTableWithStructuredOutputColumnColumn)[keyof typeof JsonQueryOnCallTableWithStructuredOutputColumnColumn]; diff --git a/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem.ts b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem.ts new file mode 100644 index 00000000..e680b4e7 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem = + | Vapi.FilterStringTypeColumnOnCallTable + | Vapi.FilterStringArrayTypeColumnOnCallTable + | Vapi.FilterNumberTypeColumnOnCallTable + | Vapi.FilterNumberArrayTypeColumnOnCallTable + | Vapi.FilterDateTypeColumnOnCallTable + | Vapi.FilterStructuredOutputColumnOnCallTable; diff --git a/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnOperation.ts b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnOperation.ts new file mode 100644 index 00000000..a516d926 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnOperation.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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". + */ +export const JsonQueryOnCallTableWithStructuredOutputColumnOperation = { + Average: "average", + Count: "count", + Sum: "sum", + Min: "min", + Max: "max", +} as const; +export type JsonQueryOnCallTableWithStructuredOutputColumnOperation = + (typeof JsonQueryOnCallTableWithStructuredOutputColumnOperation)[keyof typeof JsonQueryOnCallTableWithStructuredOutputColumnOperation]; diff --git a/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnTable.ts b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnTable.ts new file mode 100644 index 00000000..c47289b7 --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnTable.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the table that will be queried. */ +export const JsonQueryOnCallTableWithStructuredOutputColumnTable = { + Call: "call", +} as const; +export type JsonQueryOnCallTableWithStructuredOutputColumnTable = + (typeof JsonQueryOnCallTableWithStructuredOutputColumnTable)[keyof typeof JsonQueryOnCallTableWithStructuredOutputColumnTable]; diff --git a/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnType.ts b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnType.ts new file mode 100644 index 00000000..e32615aa --- /dev/null +++ b/src/api/types/JsonQueryOnCallTableWithStructuredOutputColumnType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of query. Only allowed type is "vapiql-json". */ +export const JsonQueryOnCallTableWithStructuredOutputColumnType = { + VapiqlJson: "vapiql-json", +} as const; +export type JsonQueryOnCallTableWithStructuredOutputColumnType = + (typeof JsonQueryOnCallTableWithStructuredOutputColumnType)[keyof typeof JsonQueryOnCallTableWithStructuredOutputColumnType]; diff --git a/src/api/types/JsonSchema.ts b/src/api/types/JsonSchema.ts index 781b7aaa..2b8610b6 100644 --- a/src/api/types/JsonSchema.ts +++ b/src/api/types/JsonSchema.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface JsonSchema { /** diff --git a/src/api/types/JsonSchemaFormat.ts b/src/api/types/JsonSchemaFormat.ts index a782adce..64cb045a 100644 --- a/src/api/types/JsonSchemaFormat.ts +++ b/src/api/types/JsonSchemaFormat.ts @@ -1,22 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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 */ -export type JsonSchemaFormat = - | "date-time" - | "time" - | "date" - | "duration" - | "email" - | "hostname" - | "ipv4" - | "ipv6" - | "uuid"; export const JsonSchemaFormat = { DateTime: "date-time", Time: "time", @@ -28,3 +16,4 @@ export const JsonSchemaFormat = { Ipv6: "ipv6", Uuid: "uuid", } as const; +export type JsonSchemaFormat = (typeof JsonSchemaFormat)[keyof typeof JsonSchemaFormat]; diff --git a/src/api/types/JsonSchemaType.ts b/src/api/types/JsonSchemaType.ts index 064a7c23..c84e19d4 100644 --- a/src/api/types/JsonSchemaType.ts +++ b/src/api/types/JsonSchemaType.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the type of output you'd like. @@ -13,7 +11,6 @@ * * For `object`, you can define the properties of the object using the `properties` property. */ -export type JsonSchemaType = "string" | "number" | "integer" | "boolean" | "array" | "object"; export const JsonSchemaType = { String: "string", Number: "number", @@ -22,3 +19,4 @@ export const JsonSchemaType = { Array: "array", Object: "object", } as const; +export type JsonSchemaType = (typeof JsonSchemaType)[keyof typeof JsonSchemaType]; diff --git a/src/api/types/JwtResponse.ts b/src/api/types/JwtResponse.ts index 296e4d5f..18c66e8a 100644 --- a/src/api/types/JwtResponse.ts +++ b/src/api/types/JwtResponse.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface JwtResponse { accessToken: string; diff --git a/src/api/types/KeypadInputPlan.ts b/src/api/types/KeypadInputPlan.ts index cff05584..4a8b4159 100644 --- a/src/api/types/KeypadInputPlan.ts +++ b/src/api/types/KeypadInputPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface KeypadInputPlan { /** diff --git a/src/api/types/KeypadInputPlanDelimiters.ts b/src/api/types/KeypadInputPlanDelimiters.ts index ebcfbcc0..1b30e80e 100644 --- a/src/api/types/KeypadInputPlanDelimiters.ts +++ b/src/api/types/KeypadInputPlanDelimiters.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the delimiter(s) that will be used to process the input. * Can be '#', '*', or an empty array. */ -export type KeypadInputPlanDelimiters = "#" | "*" | ""; export const KeypadInputPlanDelimiters = { Hash: "#", Asterisk: "*", Empty: "", } as const; +export type KeypadInputPlanDelimiters = (typeof KeypadInputPlanDelimiters)[keyof typeof KeypadInputPlanDelimiters]; diff --git a/src/api/types/KnowledgeBase.ts b/src/api/types/KnowledgeBase.ts index 2e618d01..d1accd4d 100644 --- a/src/api/types/KnowledgeBase.ts +++ b/src/api/types/KnowledgeBase.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface KnowledgeBase { /** The name of the knowledge base */ name: string; /** The provider of the knowledge base */ - provider: "google"; + provider: Vapi.KnowledgeBaseProvider; /** The model to use for the knowledge base */ model?: Vapi.KnowledgeBaseModel; /** A description of the knowledge base */ diff --git a/src/api/types/KnowledgeBaseCost.ts b/src/api/types/KnowledgeBaseCost.ts index 38ff177a..26a902a0 100644 --- a/src/api/types/KnowledgeBaseCost.ts +++ b/src/api/types/KnowledgeBaseCost.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface KnowledgeBaseCost { /** This is the type of cost, always 'knowledge-base' for this class. */ - type: "knowledge-base"; + type: Vapi.KnowledgeBaseCostType; /** This is the model that was used for processing the knowledge base. */ model: Record; /** This is the number of prompt tokens used in the knowledge base query. */ diff --git a/src/api/types/KnowledgeBaseCostType.ts b/src/api/types/KnowledgeBaseCostType.ts new file mode 100644 index 00000000..27bd5c44 --- /dev/null +++ b/src/api/types/KnowledgeBaseCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'knowledge-base' for this class. */ +export const KnowledgeBaseCostType = { + KnowledgeBase: "knowledge-base", +} as const; +export type KnowledgeBaseCostType = (typeof KnowledgeBaseCostType)[keyof typeof KnowledgeBaseCostType]; diff --git a/src/api/types/KnowledgeBaseModel.ts b/src/api/types/KnowledgeBaseModel.ts index 622c9993..d122f9ec 100644 --- a/src/api/types/KnowledgeBaseModel.ts +++ b/src/api/types/KnowledgeBaseModel.ts @@ -1,25 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The model to use for the knowledge base - */ -export type KnowledgeBaseModel = - | "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"; +/** The model to use for the knowledge base */ export const KnowledgeBaseModel = { Gemini25Pro: "gemini-2.5-pro", Gemini25Flash: "gemini-2.5-flash", @@ -36,3 +17,4 @@ export const KnowledgeBaseModel = { Gemini15Pro002: "gemini-1.5-pro-002", Gemini10Pro: "gemini-1.0-pro", } as const; +export type KnowledgeBaseModel = (typeof KnowledgeBaseModel)[keyof typeof KnowledgeBaseModel]; diff --git a/src/api/types/KnowledgeBaseProvider.ts b/src/api/types/KnowledgeBaseProvider.ts new file mode 100644 index 00000000..a1a48de1 --- /dev/null +++ b/src/api/types/KnowledgeBaseProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The provider of the knowledge base */ +export const KnowledgeBaseProvider = { + Google: "google", +} as const; +export type KnowledgeBaseProvider = (typeof KnowledgeBaseProvider)[keyof typeof KnowledgeBaseProvider]; diff --git a/src/api/types/KnowledgeBaseResponseDocument.ts b/src/api/types/KnowledgeBaseResponseDocument.ts index 084f3aad..5e32f046 100644 --- a/src/api/types/KnowledgeBaseResponseDocument.ts +++ b/src/api/types/KnowledgeBaseResponseDocument.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface KnowledgeBaseResponseDocument { /** This is the content of the document. */ diff --git a/src/api/types/LangfuseCredential.ts b/src/api/types/LangfuseCredential.ts index 6814a7aa..5c5db60e 100644 --- a/src/api/types/LangfuseCredential.ts +++ b/src/api/types/LangfuseCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface LangfuseCredential { - provider: "langfuse"; + provider: Vapi.LangfuseCredentialProvider; /** The public key for Langfuse project. Eg: pk-lf-... */ publicKey: string; /** The secret key for Langfuse project. Eg: sk-lf-... .This is not returned in the API. */ diff --git a/src/api/types/LangfuseCredentialProvider.ts b/src/api/types/LangfuseCredentialProvider.ts new file mode 100644 index 00000000..62e31a1b --- /dev/null +++ b/src/api/types/LangfuseCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const LangfuseCredentialProvider = { + Langfuse: "langfuse", +} as const; +export type LangfuseCredentialProvider = (typeof LangfuseCredentialProvider)[keyof typeof LangfuseCredentialProvider]; diff --git a/src/api/types/LangfuseObservabilityPlan.ts b/src/api/types/LangfuseObservabilityPlan.ts index fd249a72..2d892e26 100644 --- a/src/api/types/LangfuseObservabilityPlan.ts +++ b/src/api/types/LangfuseObservabilityPlan.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface LangfuseObservabilityPlan { - provider: "langfuse"; + provider: Vapi.LangfuseObservabilityPlanProvider; /** 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 */ tags: string[]; /** diff --git a/src/api/types/LangfuseObservabilityPlanProvider.ts b/src/api/types/LangfuseObservabilityPlanProvider.ts new file mode 100644 index 00000000..c91acc30 --- /dev/null +++ b/src/api/types/LangfuseObservabilityPlanProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const LangfuseObservabilityPlanProvider = { + Langfuse: "langfuse", +} as const; +export type LangfuseObservabilityPlanProvider = + (typeof LangfuseObservabilityPlanProvider)[keyof typeof LangfuseObservabilityPlanProvider]; diff --git a/src/api/types/LineInsight.ts b/src/api/types/LineInsight.ts new file mode 100644 index 00000000..8c47d972 --- /dev/null +++ b/src/api/types/LineInsight.ts @@ -0,0 +1,46 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface LineInsight { + /** This is the name of the Insight. */ + name?: string; + type: "line"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + /** This is the metadata for the insight. */ + metadata?: Vapi.LineInsightMetadata; + timeRange?: Vapi.InsightTimeRangeWithStep; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.LineInsightGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.LineInsightQueriesItem[]; + /** This is the unique identifier for the Insight. */ + id: string; + /** This is the unique identifier for the org that this Insight belongs to. */ + orgId: string; + /** This is the ISO 8601 date-time string of when the Insight was created. */ + createdAt: string; + /** This is the ISO 8601 date-time string of when the Insight was last updated. */ + updatedAt: string; +} diff --git a/src/api/types/LineInsightFromCallTable.ts b/src/api/types/LineInsightFromCallTable.ts new file mode 100644 index 00000000..ccccd349 --- /dev/null +++ b/src/api/types/LineInsightFromCallTable.ts @@ -0,0 +1,42 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface LineInsightFromCallTable { + /** This is the name of the Insight. */ + name?: string; + /** + * This is the type of the Insight. + * It is required to be `line` to create a line insight. + */ + type: Vapi.LineInsightFromCallTableType; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + /** This is the metadata for the insight. */ + metadata?: Vapi.LineInsightMetadata; + timeRange?: Vapi.InsightTimeRangeWithStep; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.LineInsightFromCallTableGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.LineInsightFromCallTableQueriesItem[]; +} diff --git a/src/api/types/LineInsightFromCallTableGroupBy.ts b/src/api/types/LineInsightFromCallTableGroupBy.ts new file mode 100644 index 00000000..5ecfc99e --- /dev/null +++ b/src/api/types/LineInsightFromCallTableGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const LineInsightFromCallTableGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type LineInsightFromCallTableGroupBy = + (typeof LineInsightFromCallTableGroupBy)[keyof typeof LineInsightFromCallTableGroupBy]; diff --git a/src/api/types/LineInsightFromCallTableQueriesItem.ts b/src/api/types/LineInsightFromCallTableQueriesItem.ts new file mode 100644 index 00000000..9114452d --- /dev/null +++ b/src/api/types/LineInsightFromCallTableQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type LineInsightFromCallTableQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/LineInsightFromCallTableType.ts b/src/api/types/LineInsightFromCallTableType.ts new file mode 100644 index 00000000..a2fcc0d2 --- /dev/null +++ b/src/api/types/LineInsightFromCallTableType.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the Insight. + * It is required to be `line` to create a line insight. + */ +export const LineInsightFromCallTableType = { + Line: "line", +} as const; +export type LineInsightFromCallTableType = + (typeof LineInsightFromCallTableType)[keyof typeof LineInsightFromCallTableType]; diff --git a/src/api/types/LineInsightGroupBy.ts b/src/api/types/LineInsightGroupBy.ts new file mode 100644 index 00000000..33a74db1 --- /dev/null +++ b/src/api/types/LineInsightGroupBy.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const LineInsightGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type LineInsightGroupBy = (typeof LineInsightGroupBy)[keyof typeof LineInsightGroupBy]; diff --git a/src/api/types/LineInsightMetadata.ts b/src/api/types/LineInsightMetadata.ts new file mode 100644 index 00000000..f860ab1b --- /dev/null +++ b/src/api/types/LineInsightMetadata.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface LineInsightMetadata { + xAxisLabel?: string; + yAxisLabel?: string; + yAxisMin?: number; + yAxisMax?: number; + name?: string; +} diff --git a/src/api/types/LineInsightQueriesItem.ts b/src/api/types/LineInsightQueriesItem.ts new file mode 100644 index 00000000..32c84ad9 --- /dev/null +++ b/src/api/types/LineInsightQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type LineInsightQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/LiquidCondition.ts b/src/api/types/LiquidCondition.ts index a4e037d2..09714f51 100644 --- a/src/api/types/LiquidCondition.ts +++ b/src/api/types/LiquidCondition.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface LiquidCondition { /** This is the type discriminator for liquid condition */ - type: "liquid"; + type: Vapi.LiquidConditionType; /** * 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. diff --git a/src/api/types/LiquidConditionType.ts b/src/api/types/LiquidConditionType.ts new file mode 100644 index 00000000..42155c8a --- /dev/null +++ b/src/api/types/LiquidConditionType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type discriminator for liquid condition */ +export const LiquidConditionType = { + Liquid: "liquid", +} as const; +export type LiquidConditionType = (typeof LiquidConditionType)[keyof typeof LiquidConditionType]; diff --git a/src/api/types/LivekitSmartEndpointingPlan.ts b/src/api/types/LivekitSmartEndpointingPlan.ts index aa8ad3f1..508346fc 100644 --- a/src/api/types/LivekitSmartEndpointingPlan.ts +++ b/src/api/types/LivekitSmartEndpointingPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface LivekitSmartEndpointingPlan { /** This is the provider for the smart endpointing plan. */ diff --git a/src/api/types/LivekitSmartEndpointingPlanProvider.ts b/src/api/types/LivekitSmartEndpointingPlanProvider.ts index e6e7763e..6690beb1 100644 --- a/src/api/types/LivekitSmartEndpointingPlanProvider.ts +++ b/src/api/types/LivekitSmartEndpointingPlanProvider.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the provider for the smart endpointing plan. - */ -export type LivekitSmartEndpointingPlanProvider = "vapi" | "livekit" | "custom-endpointing-model"; +/** This is the provider for the smart endpointing plan. */ export const LivekitSmartEndpointingPlanProvider = { Vapi: "vapi", Livekit: "livekit", CustomEndpointingModel: "custom-endpointing-model", } as const; +export type LivekitSmartEndpointingPlanProvider = + (typeof LivekitSmartEndpointingPlanProvider)[keyof typeof LivekitSmartEndpointingPlanProvider]; diff --git a/src/api/types/LmntCredential.ts b/src/api/types/LmntCredential.ts index 014398d9..1eb527bc 100644 --- a/src/api/types/LmntCredential.ts +++ b/src/api/types/LmntCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface LmntCredential { - provider: "lmnt"; + provider: Vapi.LmntCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/LmntCredentialProvider.ts b/src/api/types/LmntCredentialProvider.ts new file mode 100644 index 00000000..6f0267ff --- /dev/null +++ b/src/api/types/LmntCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const LmntCredentialProvider = { + Lmnt: "lmnt", +} as const; +export type LmntCredentialProvider = (typeof LmntCredentialProvider)[keyof typeof LmntCredentialProvider]; diff --git a/src/api/types/LmntVoice.ts b/src/api/types/LmntVoice.ts index 9f8269d2..7361704a 100644 --- a/src/api/types/LmntVoice.ts +++ b/src/api/types/LmntVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface LmntVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "lmnt"; + provider: Vapi.LmntVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.LmntVoiceId; /** This is the speed multiplier that will be used. */ diff --git a/src/api/types/LmntVoiceId.ts b/src/api/types/LmntVoiceId.ts index 40abab21..c70f3d36 100644 --- a/src/api/types/LmntVoiceId.ts +++ b/src/api/types/LmntVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/LmntVoiceIdEnum.ts b/src/api/types/LmntVoiceIdEnum.ts index 1b7e6d63..4d19ea43 100644 --- a/src/api/types/LmntVoiceIdEnum.ts +++ b/src/api/types/LmntVoiceIdEnum.ts @@ -1,50 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type LmntVoiceIdEnum = - | "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"; export const LmntVoiceIdEnum = { Amy: "amy", Ansel: "ansel", @@ -89,3 +44,4 @@ export const LmntVoiceIdEnum = { Zeke: "zeke", Zoe: "zoe", } as const; +export type LmntVoiceIdEnum = (typeof LmntVoiceIdEnum)[keyof typeof LmntVoiceIdEnum]; diff --git a/src/api/types/LmntVoiceLanguage.ts b/src/api/types/LmntVoiceLanguage.ts index 05bdcad7..939b8319 100644 --- a/src/api/types/LmntVoiceLanguage.ts +++ b/src/api/types/LmntVoiceLanguage.ts @@ -1,197 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Two letter ISO 639-1 language code. Use "auto" for auto-detection. - */ -export type LmntVoiceLanguage = - | "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"; +/** Two letter ISO 639-1 language code. Use "auto" for auto-detection. */ export const LmntVoiceLanguage = { Aa: "aa", Ab: "ab", @@ -380,3 +189,4 @@ export const LmntVoiceLanguage = { Zu: "zu", Auto: "auto", } as const; +export type LmntVoiceLanguage = (typeof LmntVoiceLanguage)[keyof typeof LmntVoiceLanguage]; diff --git a/src/api/types/LmntVoiceProvider.ts b/src/api/types/LmntVoiceProvider.ts new file mode 100644 index 00000000..41ee130a --- /dev/null +++ b/src/api/types/LmntVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const LmntVoiceProvider = { + Lmnt: "lmnt", +} as const; +export type LmntVoiceProvider = (typeof LmntVoiceProvider)[keyof typeof LmntVoiceProvider]; diff --git a/src/api/types/LogicEdgeCondition.ts b/src/api/types/LogicEdgeCondition.ts index da0f64ad..c4a4694e 100644 --- a/src/api/types/LogicEdgeCondition.ts +++ b/src/api/types/LogicEdgeCondition.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogicEdgeCondition = unknown; diff --git a/src/api/types/MakeCredential.ts b/src/api/types/MakeCredential.ts index dbc2d5c1..e27125bf 100644 --- a/src/api/types/MakeCredential.ts +++ b/src/api/types/MakeCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface MakeCredential { - provider: "make"; + provider: Vapi.MakeCredentialProvider; /** Team ID */ teamId: string; /** Region of your application. For example: eu1, eu2, us1, us2 */ diff --git a/src/api/types/MakeCredentialProvider.ts b/src/api/types/MakeCredentialProvider.ts new file mode 100644 index 00000000..a6e231bc --- /dev/null +++ b/src/api/types/MakeCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const MakeCredentialProvider = { + Make: "make", +} as const; +export type MakeCredentialProvider = (typeof MakeCredentialProvider)[keyof typeof MakeCredentialProvider]; diff --git a/src/api/types/MakeTool.ts b/src/api/types/MakeTool.ts index 48f4c867..7081febc 100644 --- a/src/api/types/MakeTool.ts +++ b/src/api/types/MakeTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface MakeTool { /** @@ -12,7 +10,7 @@ export interface MakeTool { */ messages?: Vapi.MakeToolMessagesItem[]; /** The type of tool. "make" for Make tool. */ - type: "make"; + type: Vapi.MakeToolType; /** This is the unique identifier for the tool. */ id: string; /** This is the unique identifier for the organization that this tool belongs to. */ diff --git a/src/api/types/MakeToolMessagesItem.ts b/src/api/types/MakeToolMessagesItem.ts index c37c7fc9..d7404ada 100644 --- a/src/api/types/MakeToolMessagesItem.ts +++ b/src/api/types/MakeToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type MakeToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/MakeToolMetadata.ts b/src/api/types/MakeToolMetadata.ts index 589e2c76..6802c30e 100644 --- a/src/api/types/MakeToolMetadata.ts +++ b/src/api/types/MakeToolMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface MakeToolMetadata { scenarioId?: number; diff --git a/src/api/types/MakeToolProviderDetails.ts b/src/api/types/MakeToolProviderDetails.ts index f69ba972..cded8b5c 100644 --- a/src/api/types/MakeToolProviderDetails.ts +++ b/src/api/types/MakeToolProviderDetails.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface MakeToolProviderDetails { /** This is the Template URL or the Snapshot URL corresponding to the Template. */ templateUrl?: string; setupInstructions?: Vapi.ToolTemplateSetup[]; /** The type of tool. "make" for Make tool. */ - type: "make"; + type: Vapi.MakeToolProviderDetailsType; scenarioId?: number; scenarioName?: string; triggerHookId?: number; diff --git a/src/api/types/MakeToolProviderDetailsType.ts b/src/api/types/MakeToolProviderDetailsType.ts new file mode 100644 index 00000000..2a61a01a --- /dev/null +++ b/src/api/types/MakeToolProviderDetailsType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "make" for Make tool. */ +export const MakeToolProviderDetailsType = { + Make: "make", +} as const; +export type MakeToolProviderDetailsType = + (typeof MakeToolProviderDetailsType)[keyof typeof MakeToolProviderDetailsType]; diff --git a/src/api/types/MakeToolType.ts b/src/api/types/MakeToolType.ts new file mode 100644 index 00000000..47cf5458 --- /dev/null +++ b/src/api/types/MakeToolType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "make" for Make tool. */ +export const MakeToolType = { + Make: "make", +} as const; +export type MakeToolType = (typeof MakeToolType)[keyof typeof MakeToolType]; diff --git a/src/api/types/MakeToolWithToolCall.ts b/src/api/types/MakeToolWithToolCall.ts index 7478a9c2..2d04b3ea 100644 --- a/src/api/types/MakeToolWithToolCall.ts +++ b/src/api/types/MakeToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface MakeToolWithToolCall { /** @@ -12,7 +10,7 @@ export interface MakeToolWithToolCall { */ messages?: Vapi.MakeToolWithToolCallMessagesItem[]; /** The type of tool. "make" for Make tool. */ - type: "make"; + type: Vapi.MakeToolWithToolCallType; toolCall: Vapi.ToolCall; metadata: Vapi.MakeToolMetadata; /** diff --git a/src/api/types/MakeToolWithToolCallMessagesItem.ts b/src/api/types/MakeToolWithToolCallMessagesItem.ts index 775f2d61..5f0745f5 100644 --- a/src/api/types/MakeToolWithToolCallMessagesItem.ts +++ b/src/api/types/MakeToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type MakeToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/MakeToolWithToolCallType.ts b/src/api/types/MakeToolWithToolCallType.ts new file mode 100644 index 00000000..ece496c7 --- /dev/null +++ b/src/api/types/MakeToolWithToolCallType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "make" for Make tool. */ +export const MakeToolWithToolCallType = { + Make: "make", +} as const; +export type MakeToolWithToolCallType = (typeof MakeToolWithToolCallType)[keyof typeof MakeToolWithToolCallType]; diff --git a/src/api/types/McpTool.ts b/src/api/types/McpTool.ts index f2f3cd52..2ede8764 100644 --- a/src/api/types/McpTool.ts +++ b/src/api/types/McpTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface McpTool { /** diff --git a/src/api/types/McpToolMessagesItem.ts b/src/api/types/McpToolMessagesItem.ts index 08f0e3b9..7baac6ac 100644 --- a/src/api/types/McpToolMessagesItem.ts +++ b/src/api/types/McpToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type McpToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/McpToolMetadata.ts b/src/api/types/McpToolMetadata.ts index 6d4c3a3e..66e99024 100644 --- a/src/api/types/McpToolMetadata.ts +++ b/src/api/types/McpToolMetadata.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface McpToolMetadata { /** This is the protocol used for MCP communication. Defaults to Streamable HTTP. */ diff --git a/src/api/types/McpToolMetadataProtocol.ts b/src/api/types/McpToolMetadataProtocol.ts index b4145644..86a67fad 100644 --- a/src/api/types/McpToolMetadataProtocol.ts +++ b/src/api/types/McpToolMetadataProtocol.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the protocol used for MCP communication. Defaults to Streamable HTTP. - */ -export type McpToolMetadataProtocol = "sse" | "shttp"; +/** This is the protocol used for MCP communication. Defaults to Streamable HTTP. */ export const McpToolMetadataProtocol = { Sse: "sse", Shttp: "shttp", } as const; +export type McpToolMetadataProtocol = (typeof McpToolMetadataProtocol)[keyof typeof McpToolMetadataProtocol]; diff --git a/src/api/types/MessageTarget.ts b/src/api/types/MessageTarget.ts index c75118bb..990cf84f 100644 --- a/src/api/types/MessageTarget.ts +++ b/src/api/types/MessageTarget.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface MessageTarget { /** diff --git a/src/api/types/MessageTargetRole.ts b/src/api/types/MessageTargetRole.ts index 54b56cce..261c5898 100644 --- a/src/api/types/MessageTargetRole.ts +++ b/src/api/types/MessageTargetRole.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the role of the message to target. * * If not specified, will find the position in the message history ignoring role (effectively `any`). */ -export type MessageTargetRole = "user" | "assistant"; export const MessageTargetRole = { User: "user", Assistant: "assistant", } as const; +export type MessageTargetRole = (typeof MessageTargetRole)[keyof typeof MessageTargetRole]; diff --git a/src/api/types/MinimaxVoice.ts b/src/api/types/MinimaxVoice.ts index d1a03d0c..0b529697 100644 --- a/src/api/types/MinimaxVoice.ts +++ b/src/api/types/MinimaxVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface MinimaxVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "minimax"; + provider: Vapi.MinimaxVoiceProvider; /** This is the provider-specific ID that will be used. Use a voice from MINIMAX_PREDEFINED_VOICES or a custom cloned voice ID. */ voiceId: string; /** diff --git a/src/api/types/MinimaxVoiceLanguageBoost.ts b/src/api/types/MinimaxVoiceLanguageBoost.ts index 35a0155a..a976487a 100644 --- a/src/api/types/MinimaxVoiceLanguageBoost.ts +++ b/src/api/types/MinimaxVoiceLanguageBoost.ts @@ -1,52 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English). - */ -export type MinimaxVoiceLanguageBoost = - | "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"; +/** Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English). */ export const MinimaxVoiceLanguageBoost = { Chinese: "Chinese", ChineseYue: "Chinese,Yue", @@ -90,3 +44,4 @@ export const MinimaxVoiceLanguageBoost = { Afrikaans: "Afrikaans", Auto: "auto", } as const; +export type MinimaxVoiceLanguageBoost = (typeof MinimaxVoiceLanguageBoost)[keyof typeof MinimaxVoiceLanguageBoost]; diff --git a/src/api/types/MinimaxVoiceModel.ts b/src/api/types/MinimaxVoiceModel.ts index 33cf270b..08d18c86 100644 --- a/src/api/types/MinimaxVoiceModel.ts +++ b/src/api/types/MinimaxVoiceModel.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the model that will be used. Options are 'speech-02-hd' and 'speech-02-turbo'. @@ -9,9 +7,9 @@ * * @default "speech-02-turbo" */ -export type MinimaxVoiceModel = "speech-02-hd" | "speech-02-turbo" | "speech-2.5-turbo-preview"; export const MinimaxVoiceModel = { Speech02Hd: "speech-02-hd", Speech02Turbo: "speech-02-turbo", Speech25TurboPreview: "speech-2.5-turbo-preview", } as const; +export type MinimaxVoiceModel = (typeof MinimaxVoiceModel)[keyof typeof MinimaxVoiceModel]; diff --git a/src/api/types/MinimaxVoiceProvider.ts b/src/api/types/MinimaxVoiceProvider.ts new file mode 100644 index 00000000..9f354c4d --- /dev/null +++ b/src/api/types/MinimaxVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const MinimaxVoiceProvider = { + Minimax: "minimax", +} as const; +export type MinimaxVoiceProvider = (typeof MinimaxVoiceProvider)[keyof typeof MinimaxVoiceProvider]; diff --git a/src/api/types/MinimaxVoiceRegion.ts b/src/api/types/MinimaxVoiceRegion.ts index 41f329e7..5954cf38 100644 --- a/src/api/types/MinimaxVoiceRegion.ts +++ b/src/api/types/MinimaxVoiceRegion.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The region for Minimax API. Defaults to "worldwide". - */ -export type MinimaxVoiceRegion = "worldwide" | "china"; +/** The region for Minimax API. Defaults to "worldwide". */ export const MinimaxVoiceRegion = { Worldwide: "worldwide", China: "china", } as const; +export type MinimaxVoiceRegion = (typeof MinimaxVoiceRegion)[keyof typeof MinimaxVoiceRegion]; diff --git a/src/api/types/MistralCredential.ts b/src/api/types/MistralCredential.ts index d5498e82..a4e06046 100644 --- a/src/api/types/MistralCredential.ts +++ b/src/api/types/MistralCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface MistralCredential { - provider: "mistral"; + provider: Vapi.MistralCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/MistralCredentialProvider.ts b/src/api/types/MistralCredentialProvider.ts new file mode 100644 index 00000000..e6724024 --- /dev/null +++ b/src/api/types/MistralCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const MistralCredentialProvider = { + Mistral: "mistral", +} as const; +export type MistralCredentialProvider = (typeof MistralCredentialProvider)[keyof typeof MistralCredentialProvider]; diff --git a/src/api/types/ModelCost.ts b/src/api/types/ModelCost.ts index 446a5210..6a76112c 100644 --- a/src/api/types/ModelCost.ts +++ b/src/api/types/ModelCost.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ModelCost { /** This is the type of cost, always 'model' for this class. */ - type: "model"; + type: Vapi.ModelCostType; /** * This is the model that was used during the call. * diff --git a/src/api/types/ModelCostType.ts b/src/api/types/ModelCostType.ts new file mode 100644 index 00000000..f8556b78 --- /dev/null +++ b/src/api/types/ModelCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'model' for this class. */ +export const ModelCostType = { + Model: "model", +} as const; +export type ModelCostType = (typeof ModelCostType)[keyof typeof ModelCostType]; diff --git a/src/api/types/Monitor.ts b/src/api/types/Monitor.ts index 5a05b5da..ce9e993a 100644 --- a/src/api/types/Monitor.ts +++ b/src/api/types/Monitor.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface Monitor { /** This is the URL where the assistant's calls can be listened to in real-time. To enable, set `assistant.monitorPlan.listenEnabled` to `true`. */ diff --git a/src/api/types/MonitorPlan.ts b/src/api/types/MonitorPlan.ts index 3d395ad7..0844db35 100644 --- a/src/api/types/MonitorPlan.ts +++ b/src/api/types/MonitorPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface MonitorPlan { /** diff --git a/src/api/types/Mono.ts b/src/api/types/Mono.ts index 9b47367e..d8461b7f 100644 --- a/src/api/types/Mono.ts +++ b/src/api/types/Mono.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface Mono { /** This is the combined recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */ diff --git a/src/api/types/NeetsVoice.ts b/src/api/types/NeetsVoice.ts index 5e025fbd..7212fc48 100644 --- a/src/api/types/NeetsVoice.ts +++ b/src/api/types/NeetsVoice.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface NeetsVoice { voiceId?: unknown; diff --git a/src/api/types/NeuphonicCredential.ts b/src/api/types/NeuphonicCredential.ts index 92e7d34b..5e5cd46d 100644 --- a/src/api/types/NeuphonicCredential.ts +++ b/src/api/types/NeuphonicCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface NeuphonicCredential { - provider: "neuphonic"; + provider: Vapi.NeuphonicCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/NeuphonicCredentialProvider.ts b/src/api/types/NeuphonicCredentialProvider.ts new file mode 100644 index 00000000..edcc58e3 --- /dev/null +++ b/src/api/types/NeuphonicCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const NeuphonicCredentialProvider = { + Neuphonic: "neuphonic", +} as const; +export type NeuphonicCredentialProvider = + (typeof NeuphonicCredentialProvider)[keyof typeof NeuphonicCredentialProvider]; diff --git a/src/api/types/NeuphonicVoice.ts b/src/api/types/NeuphonicVoice.ts index a0772bb1..22230088 100644 --- a/src/api/types/NeuphonicVoice.ts +++ b/src/api/types/NeuphonicVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface NeuphonicVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "neuphonic"; + provider: Vapi.NeuphonicVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: string; /** This is the model that will be used. Defaults to 'neu_fast' if not specified. */ diff --git a/src/api/types/NeuphonicVoiceModel.ts b/src/api/types/NeuphonicVoiceModel.ts index 68d29bd0..d17f7a3d 100644 --- a/src/api/types/NeuphonicVoiceModel.ts +++ b/src/api/types/NeuphonicVoiceModel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. Defaults to 'neu_fast' if not specified. - */ -export type NeuphonicVoiceModel = "neu_hq" | "neu_fast"; +/** This is the model that will be used. Defaults to 'neu_fast' if not specified. */ export const NeuphonicVoiceModel = { NeuHq: "neu_hq", NeuFast: "neu_fast", } as const; +export type NeuphonicVoiceModel = (typeof NeuphonicVoiceModel)[keyof typeof NeuphonicVoiceModel]; diff --git a/src/api/types/NeuphonicVoiceProvider.ts b/src/api/types/NeuphonicVoiceProvider.ts new file mode 100644 index 00000000..574a3a44 --- /dev/null +++ b/src/api/types/NeuphonicVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const NeuphonicVoiceProvider = { + Neuphonic: "neuphonic", +} as const; +export type NeuphonicVoiceProvider = (typeof NeuphonicVoiceProvider)[keyof typeof NeuphonicVoiceProvider]; diff --git a/src/api/types/NodeArtifact.ts b/src/api/types/NodeArtifact.ts index 92827d34..037b4993 100644 --- a/src/api/types/NodeArtifact.ts +++ b/src/api/types/NodeArtifact.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface NodeArtifact { /** These are the messages that were spoken during the node. */ diff --git a/src/api/types/NodeArtifactMessagesItem.ts b/src/api/types/NodeArtifactMessagesItem.ts index e404a476..3af5fda3 100644 --- a/src/api/types/NodeArtifactMessagesItem.ts +++ b/src/api/types/NodeArtifactMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type NodeArtifactMessagesItem = | Vapi.UserMessage diff --git a/src/api/types/OAuth2AuthenticationPlan.ts b/src/api/types/OAuth2AuthenticationPlan.ts index a63e9178..6df11348 100644 --- a/src/api/types/OAuth2AuthenticationPlan.ts +++ b/src/api/types/OAuth2AuthenticationPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface OAuth2AuthenticationPlan { type: "oauth2"; diff --git a/src/api/types/Oauth2AuthenticationSession.ts b/src/api/types/Oauth2AuthenticationSession.ts index f81fd724..962e4be2 100644 --- a/src/api/types/Oauth2AuthenticationSession.ts +++ b/src/api/types/Oauth2AuthenticationSession.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface Oauth2AuthenticationSession { /** This is the OAuth2 access token. */ diff --git a/src/api/types/OpenAiCredential.ts b/src/api/types/OpenAiCredential.ts index f1ffa144..56f27a1d 100644 --- a/src/api/types/OpenAiCredential.ts +++ b/src/api/types/OpenAiCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface OpenAiCredential { - provider: "openai"; + provider: Vapi.OpenAiCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/OpenAiCredentialProvider.ts b/src/api/types/OpenAiCredentialProvider.ts new file mode 100644 index 00000000..d20c77e3 --- /dev/null +++ b/src/api/types/OpenAiCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const OpenAiCredentialProvider = { + Openai: "openai", +} as const; +export type OpenAiCredentialProvider = (typeof OpenAiCredentialProvider)[keyof typeof OpenAiCredentialProvider]; diff --git a/src/api/types/OpenAiFunction.ts b/src/api/types/OpenAiFunction.ts index ed9bdbda..fc351784 100644 --- a/src/api/types/OpenAiFunction.ts +++ b/src/api/types/OpenAiFunction.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenAiFunction { /** diff --git a/src/api/types/OpenAiFunctionParameters.ts b/src/api/types/OpenAiFunctionParameters.ts index eb19840a..822516dd 100644 --- a/src/api/types/OpenAiFunctionParameters.ts +++ b/src/api/types/OpenAiFunctionParameters.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenAiFunctionParameters { /** This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties. */ - type: "object"; + type: Vapi.OpenAiFunctionParametersType; /** * This provides a description of the properties required by the function. * JSON Schema can be used to specify expectations for each property. diff --git a/src/api/types/OpenAiFunctionParametersType.ts b/src/api/types/OpenAiFunctionParametersType.ts new file mode 100644 index 00000000..a841bceb --- /dev/null +++ b/src/api/types/OpenAiFunctionParametersType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties. */ +export const OpenAiFunctionParametersType = { + Object: "object", +} as const; +export type OpenAiFunctionParametersType = + (typeof OpenAiFunctionParametersType)[keyof typeof OpenAiFunctionParametersType]; diff --git a/src/api/types/OpenAiMessage.ts b/src/api/types/OpenAiMessage.ts index d1ae2c76..6183a777 100644 --- a/src/api/types/OpenAiMessage.ts +++ b/src/api/types/OpenAiMessage.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenAiMessage { - content?: string | null; + content: string | null; role: Vapi.OpenAiMessageRole; } diff --git a/src/api/types/OpenAiMessageRole.ts b/src/api/types/OpenAiMessageRole.ts index 3dc849df..a5b26da8 100644 --- a/src/api/types/OpenAiMessageRole.ts +++ b/src/api/types/OpenAiMessageRole.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type OpenAiMessageRole = "assistant" | "function" | "user" | "system" | "tool"; export const OpenAiMessageRole = { Assistant: "assistant", Function: "function", @@ -10,3 +7,4 @@ export const OpenAiMessageRole = { System: "system", Tool: "tool", } as const; +export type OpenAiMessageRole = (typeof OpenAiMessageRole)[keyof typeof OpenAiMessageRole]; diff --git a/src/api/types/OpenAiModel.ts b/src/api/types/OpenAiModel.ts index 6d495b7d..0f7a6da5 100644 --- a/src/api/types/OpenAiModel.ts +++ b/src/api/types/OpenAiModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenAiModel { /** This is the starting state for the conversation. */ @@ -22,7 +20,7 @@ export interface OpenAiModel { /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; /** This is the provider that will be used for the model. */ - provider: "openai"; + provider: Vapi.OpenAiModelProvider; /** * This is the OpenAI model that will be used. * diff --git a/src/api/types/OpenAiModelFallbackModelsItem.ts b/src/api/types/OpenAiModelFallbackModelsItem.ts index c7e983c5..480f5b33 100644 --- a/src/api/types/OpenAiModelFallbackModelsItem.ts +++ b/src/api/types/OpenAiModelFallbackModelsItem.ts @@ -1,106 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type OpenAiModelFallbackModelsItem = - | "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-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-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-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-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-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:australia" - | "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"; export const OpenAiModelFallbackModelsItem = { + Gpt51: "gpt-5.1", + Gpt51ChatLatest: "gpt-5.1-chat-latest", Gpt5: "gpt-5", Gpt5Mini: "gpt-5-mini", Gpt5Nano: "gpt-5-nano", @@ -199,3 +101,5 @@ export const OpenAiModelFallbackModelsItem = { Gpt35Turbo1106Canadaeast: "gpt-3.5-turbo-1106:canadaeast", Gpt35Turbo1106Westus: "gpt-3.5-turbo-1106:westus", } as const; +export type OpenAiModelFallbackModelsItem = + (typeof OpenAiModelFallbackModelsItem)[keyof typeof OpenAiModelFallbackModelsItem]; diff --git a/src/api/types/OpenAiModelModel.ts b/src/api/types/OpenAiModelModel.ts index 4eabe1ee..75721c52 100644 --- a/src/api/types/OpenAiModelModel.ts +++ b/src/api/types/OpenAiModelModel.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the OpenAI model that will be used. @@ -10,105 +8,9 @@ * * @default undefined */ -export type OpenAiModelModel = - | "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-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-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-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-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-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:australia" - | "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"; export const OpenAiModelModel = { + Gpt51: "gpt-5.1", + Gpt51ChatLatest: "gpt-5.1-chat-latest", Gpt5: "gpt-5", Gpt5Mini: "gpt-5-mini", Gpt5Nano: "gpt-5-nano", @@ -207,3 +109,4 @@ export const OpenAiModelModel = { Gpt35Turbo1106Canadaeast: "gpt-3.5-turbo-1106:canadaeast", Gpt35Turbo1106Westus: "gpt-3.5-turbo-1106:westus", } as const; +export type OpenAiModelModel = (typeof OpenAiModelModel)[keyof typeof OpenAiModelModel]; diff --git a/src/api/types/OpenAiModelProvider.ts b/src/api/types/OpenAiModelProvider.ts new file mode 100644 index 00000000..9faf40ea --- /dev/null +++ b/src/api/types/OpenAiModelProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider that will be used for the model. */ +export const OpenAiModelProvider = { + Openai: "openai", +} as const; +export type OpenAiModelProvider = (typeof OpenAiModelProvider)[keyof typeof OpenAiModelProvider]; diff --git a/src/api/types/OpenAiModelToolStrictCompatibilityMode.ts b/src/api/types/OpenAiModelToolStrictCompatibilityMode.ts index f2bd0580..ad1b9214 100644 --- a/src/api/types/OpenAiModelToolStrictCompatibilityMode.ts +++ b/src/api/types/OpenAiModelToolStrictCompatibilityMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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. @@ -10,10 +8,9 @@ * * @default `strip-unsupported-validation` */ -export type OpenAiModelToolStrictCompatibilityMode = - | "strip-parameters-with-unsupported-validation" - | "strip-unsupported-validation"; export const OpenAiModelToolStrictCompatibilityMode = { StripParametersWithUnsupportedValidation: "strip-parameters-with-unsupported-validation", StripUnsupportedValidation: "strip-unsupported-validation", } as const; +export type OpenAiModelToolStrictCompatibilityMode = + (typeof OpenAiModelToolStrictCompatibilityMode)[keyof typeof OpenAiModelToolStrictCompatibilityMode]; diff --git a/src/api/types/OpenAiModelToolsItem.ts b/src/api/types/OpenAiModelToolsItem.ts index 7221c079..d5ceba51 100644 --- a/src/api/types/OpenAiModelToolsItem.ts +++ b/src/api/types/OpenAiModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type OpenAiModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/OpenAiTranscriber.ts b/src/api/types/OpenAiTranscriber.ts index 3c2d4324..fbabe72b 100644 --- a/src/api/types/OpenAiTranscriber.ts +++ b/src/api/types/OpenAiTranscriber.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenAiTranscriber { /** This is the transcription provider that will be used. */ - provider: "openai"; + provider: Vapi.OpenAiTranscriberProvider; /** This is the model that will be used for the transcription. */ model: Vapi.OpenAiTranscriberModel; /** This is the language that will be set for the transcription. */ diff --git a/src/api/types/OpenAiTranscriberLanguage.ts b/src/api/types/OpenAiTranscriberLanguage.ts index 3687a84f..4cb4fef6 100644 --- a/src/api/types/OpenAiTranscriberLanguage.ts +++ b/src/api/types/OpenAiTranscriberLanguage.ts @@ -1,68 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the language that will be set for the transcription. - */ -export type OpenAiTranscriberLanguage = - | "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"; +/** This is the language that will be set for the transcription. */ export const OpenAiTranscriberLanguage = { Af: "af", Ar: "ar", @@ -122,3 +60,4 @@ export const OpenAiTranscriberLanguage = { Vi: "vi", Cy: "cy", } as const; +export type OpenAiTranscriberLanguage = (typeof OpenAiTranscriberLanguage)[keyof typeof OpenAiTranscriberLanguage]; diff --git a/src/api/types/OpenAiTranscriberModel.ts b/src/api/types/OpenAiTranscriberModel.ts index 867659d0..fd23e358 100644 --- a/src/api/types/OpenAiTranscriberModel.ts +++ b/src/api/types/OpenAiTranscriberModel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used for the transcription. - */ -export type OpenAiTranscriberModel = "gpt-4o-transcribe" | "gpt-4o-mini-transcribe"; +/** This is the model that will be used for the transcription. */ export const OpenAiTranscriberModel = { Gpt4OTranscribe: "gpt-4o-transcribe", Gpt4OMiniTranscribe: "gpt-4o-mini-transcribe", } as const; +export type OpenAiTranscriberModel = (typeof OpenAiTranscriberModel)[keyof typeof OpenAiTranscriberModel]; diff --git a/src/api/types/OpenAiTranscriberProvider.ts b/src/api/types/OpenAiTranscriberProvider.ts new file mode 100644 index 00000000..763c3813 --- /dev/null +++ b/src/api/types/OpenAiTranscriberProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const OpenAiTranscriberProvider = { + Openai: "openai", +} as const; +export type OpenAiTranscriberProvider = (typeof OpenAiTranscriberProvider)[keyof typeof OpenAiTranscriberProvider]; diff --git a/src/api/types/OpenAiVoice.ts b/src/api/types/OpenAiVoice.ts index 62895475..2b1ae09b 100644 --- a/src/api/types/OpenAiVoice.ts +++ b/src/api/types/OpenAiVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenAiVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "openai"; + provider: Vapi.OpenAiVoiceProvider; /** * This is the provider-specific ID that will be used. * Please note that ash, ballad, coral, sage, and verse may only be used with realtime models. diff --git a/src/api/types/OpenAiVoiceId.ts b/src/api/types/OpenAiVoiceId.ts index ae64baac..b567f89b 100644 --- a/src/api/types/OpenAiVoiceId.ts +++ b/src/api/types/OpenAiVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/OpenAiVoiceIdEnum.ts b/src/api/types/OpenAiVoiceIdEnum.ts index e1c60676..528e1f25 100644 --- a/src/api/types/OpenAiVoiceIdEnum.ts +++ b/src/api/types/OpenAiVoiceIdEnum.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type OpenAiVoiceIdEnum = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer" | "marin" | "cedar"; export const OpenAiVoiceIdEnum = { Alloy: "alloy", Echo: "echo", @@ -13,3 +10,4 @@ export const OpenAiVoiceIdEnum = { Marin: "marin", Cedar: "cedar", } as const; +export type OpenAiVoiceIdEnum = (typeof OpenAiVoiceIdEnum)[keyof typeof OpenAiVoiceIdEnum]; diff --git a/src/api/types/OpenAiVoiceModel.ts b/src/api/types/OpenAiVoiceModel.ts index 3db4e4c8..55bb1d35 100644 --- a/src/api/types/OpenAiVoiceModel.ts +++ b/src/api/types/OpenAiVoiceModel.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used for text-to-speech. - */ -export type OpenAiVoiceModel = "tts-1" | "tts-1-hd" | "gpt-4o-mini-tts"; +/** This is the model that will be used for text-to-speech. */ export const OpenAiVoiceModel = { Tts1: "tts-1", Tts1Hd: "tts-1-hd", Gpt4OMiniTts: "gpt-4o-mini-tts", } as const; +export type OpenAiVoiceModel = (typeof OpenAiVoiceModel)[keyof typeof OpenAiVoiceModel]; diff --git a/src/api/types/OpenAiVoiceProvider.ts b/src/api/types/OpenAiVoiceProvider.ts new file mode 100644 index 00000000..2a90d3c4 --- /dev/null +++ b/src/api/types/OpenAiVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const OpenAiVoiceProvider = { + Openai: "openai", +} as const; +export type OpenAiVoiceProvider = (typeof OpenAiVoiceProvider)[keyof typeof OpenAiVoiceProvider]; diff --git a/src/api/types/OpenAiVoicemailDetectionPlan.ts b/src/api/types/OpenAiVoicemailDetectionPlan.ts index 3ea2b077..9af011d0 100644 --- a/src/api/types/OpenAiVoicemailDetectionPlan.ts +++ b/src/api/types/OpenAiVoicemailDetectionPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenAiVoicemailDetectionPlan { /** @@ -18,7 +16,7 @@ export interface OpenAiVoicemailDetectionPlan { */ beepMaxAwaitSeconds?: number; /** This is the provider to use for voicemail detection. */ - provider: "openai"; + provider: Vapi.OpenAiVoicemailDetectionPlanProvider; /** This is the backoff plan for the voicemail detection. */ backoffPlan?: Vapi.VoicemailDetectionBackoffPlan; /** diff --git a/src/api/types/OpenAiVoicemailDetectionPlanProvider.ts b/src/api/types/OpenAiVoicemailDetectionPlanProvider.ts new file mode 100644 index 00000000..8e160f38 --- /dev/null +++ b/src/api/types/OpenAiVoicemailDetectionPlanProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider to use for voicemail detection. */ +export const OpenAiVoicemailDetectionPlanProvider = { + Openai: "openai", +} as const; +export type OpenAiVoicemailDetectionPlanProvider = + (typeof OpenAiVoicemailDetectionPlanProvider)[keyof typeof OpenAiVoicemailDetectionPlanProvider]; diff --git a/src/api/types/OpenAiVoicemailDetectionPlanType.ts b/src/api/types/OpenAiVoicemailDetectionPlanType.ts index 6291916d..cb434906 100644 --- a/src/api/types/OpenAiVoicemailDetectionPlanType.ts +++ b/src/api/types/OpenAiVoicemailDetectionPlanType.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the detection type to use for voicemail detection. @@ -8,8 +6,9 @@ * - 'transcript': Uses ASR/transcript-based detection * @default 'audio' (audio detection) */ -export type OpenAiVoicemailDetectionPlanType = "audio" | "transcript"; export const OpenAiVoicemailDetectionPlanType = { Audio: "audio", Transcript: "transcript", } as const; +export type OpenAiVoicemailDetectionPlanType = + (typeof OpenAiVoicemailDetectionPlanType)[keyof typeof OpenAiVoicemailDetectionPlanType]; diff --git a/src/api/types/OpenAiWebChatRequest.ts b/src/api/types/OpenAiWebChatRequest.ts index 629c8cd6..e9af3d8f 100644 --- a/src/api/types/OpenAiWebChatRequest.ts +++ b/src/api/types/OpenAiWebChatRequest.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenAiWebChatRequest { /** The assistant ID to use for this chat */ @@ -13,6 +11,11 @@ export interface OpenAiWebChatRequest { * If not provided or expired, a new session will be created. */ sessionId?: string; + /** + * 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. + * If 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. + */ + sessionExpirationSeconds?: number; /** * These are the variable values that will be used to replace template variables in the assistant messages. * Only variable substitution is supported in web chat - other assistant properties cannot be overridden. diff --git a/src/api/types/OpenAiWebChatRequestInput.ts b/src/api/types/OpenAiWebChatRequestInput.ts index d6f54a6a..e98b3318 100644 --- a/src/api/types/OpenAiWebChatRequestInput.ts +++ b/src/api/types/OpenAiWebChatRequestInput.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the input text for the chat. * Can be a string or an array of chat messages. */ -export type OpenAiWebChatRequestInput = string | Vapi.OpenAiWebChatRequestInputItem[]; +export type OpenAiWebChatRequestInput = string | Vapi.OpenAiWebChatRequestInputOneItem[]; diff --git a/src/api/types/OpenAiWebChatRequestInputItem.ts b/src/api/types/OpenAiWebChatRequestInputItem.ts deleted file mode 100644 index 42582cf1..00000000 --- a/src/api/types/OpenAiWebChatRequestInputItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index.js"; - -export type OpenAiWebChatRequestInputItem = - | Vapi.SystemMessage - | Vapi.UserMessage - | Vapi.AssistantMessage - | Vapi.ToolMessage - | Vapi.DeveloperMessage; diff --git a/src/api/types/OpenAiWebChatRequestInputOneItem.ts b/src/api/types/OpenAiWebChatRequestInputOneItem.ts new file mode 100644 index 00000000..f70e4d5f --- /dev/null +++ b/src/api/types/OpenAiWebChatRequestInputOneItem.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type OpenAiWebChatRequestInputOneItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/OpenRouterCredential.ts b/src/api/types/OpenRouterCredential.ts index 320429f4..10b7e328 100644 --- a/src/api/types/OpenRouterCredential.ts +++ b/src/api/types/OpenRouterCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface OpenRouterCredential { - provider: "openrouter"; + provider: Vapi.OpenRouterCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/OpenRouterCredentialProvider.ts b/src/api/types/OpenRouterCredentialProvider.ts new file mode 100644 index 00000000..0d579207 --- /dev/null +++ b/src/api/types/OpenRouterCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const OpenRouterCredentialProvider = { + Openrouter: "openrouter", +} as const; +export type OpenRouterCredentialProvider = + (typeof OpenRouterCredentialProvider)[keyof typeof OpenRouterCredentialProvider]; diff --git a/src/api/types/OpenRouterModel.ts b/src/api/types/OpenRouterModel.ts index c3c53297..a98c2fae 100644 --- a/src/api/types/OpenRouterModel.ts +++ b/src/api/types/OpenRouterModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OpenRouterModel { /** This is the starting state for the conversation. */ @@ -21,7 +19,7 @@ export interface OpenRouterModel { toolIds?: string[]; /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; - provider: "openrouter"; + provider: Vapi.OpenRouterModelProvider; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: string; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ diff --git a/src/api/types/OpenRouterModelProvider.ts b/src/api/types/OpenRouterModelProvider.ts new file mode 100644 index 00000000..b62ffda6 --- /dev/null +++ b/src/api/types/OpenRouterModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const OpenRouterModelProvider = { + Openrouter: "openrouter", +} as const; +export type OpenRouterModelProvider = (typeof OpenRouterModelProvider)[keyof typeof OpenRouterModelProvider]; diff --git a/src/api/types/OpenRouterModelToolsItem.ts b/src/api/types/OpenRouterModelToolsItem.ts index aaeb1a16..54c484d0 100644 --- a/src/api/types/OpenRouterModelToolsItem.ts +++ b/src/api/types/OpenRouterModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type OpenRouterModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/Org.ts b/src/api/types/Org.ts index ff6ef032..57e75ed4 100644 --- a/src/api/types/Org.ts +++ b/src/api/types/Org.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Org { /** diff --git a/src/api/types/OrgChannel.ts b/src/api/types/OrgChannel.ts index 42479e80..733c4984 100644 --- a/src/api/types/OrgChannel.ts +++ b/src/api/types/OrgChannel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the channel of the org. There is the cluster the API traffic for the org will be directed. - */ -export type OrgChannel = "default" | "weekly"; +/** This is the channel of the org. There is the cluster the API traffic for the org will be directed. */ export const OrgChannel = { Default: "default", Weekly: "weekly", } as const; +export type OrgChannel = (typeof OrgChannel)[keyof typeof OrgChannel]; diff --git a/src/api/types/OutputTool.ts b/src/api/types/OutputTool.ts index 2222f23f..e0f28f0d 100644 --- a/src/api/types/OutputTool.ts +++ b/src/api/types/OutputTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface OutputTool { /** @@ -12,7 +10,7 @@ export interface OutputTool { */ messages?: Vapi.OutputToolMessagesItem[]; /** The type of tool. "output" for Output tool. */ - type: "output"; + type: Vapi.OutputToolType; /** This is the unique identifier for the tool. */ id: string; /** This is the unique identifier for the organization that this tool belongs to. */ diff --git a/src/api/types/OutputToolMessagesItem.ts b/src/api/types/OutputToolMessagesItem.ts index 54b65a83..1ed22ceb 100644 --- a/src/api/types/OutputToolMessagesItem.ts +++ b/src/api/types/OutputToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type OutputToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/OutputToolType.ts b/src/api/types/OutputToolType.ts new file mode 100644 index 00000000..1d9f56d2 --- /dev/null +++ b/src/api/types/OutputToolType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "output" for Output tool. */ +export const OutputToolType = { + Output: "output", +} as const; +export type OutputToolType = (typeof OutputToolType)[keyof typeof OutputToolType]; diff --git a/src/api/types/PaginationMeta.ts b/src/api/types/PaginationMeta.ts index 3fa92f15..17b08b83 100644 --- a/src/api/types/PaginationMeta.ts +++ b/src/api/types/PaginationMeta.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface PaginationMeta { itemsPerPage: number; diff --git a/src/api/types/PerformanceMetrics.ts b/src/api/types/PerformanceMetrics.ts index a85d035c..9a04c70b 100644 --- a/src/api/types/PerformanceMetrics.ts +++ b/src/api/types/PerformanceMetrics.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface PerformanceMetrics { /** These are the individual latencies for each turn. */ @@ -17,4 +15,12 @@ export interface PerformanceMetrics { endpointingLatencyAverage?: number; /** This is the average latency for complete turns. */ turnLatencyAverage?: number; + /** This is the average latency for packets received from the transport provider in milliseconds. */ + fromTransportLatencyAverage?: number; + /** This is the average latency for packets sent to the transport provider in milliseconds. */ + toTransportLatencyAverage?: number; + /** This is the number of times the user was interrupted by the assistant during the call. */ + numUserInterrupted?: number; + /** This is the number of times the assistant was interrupted by the user during the call. */ + numAssistantInterrupted?: number; } diff --git a/src/api/types/PerplexityAiCredential.ts b/src/api/types/PerplexityAiCredential.ts index cd2d2700..ceb450f1 100644 --- a/src/api/types/PerplexityAiCredential.ts +++ b/src/api/types/PerplexityAiCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface PerplexityAiCredential { - provider: "perplexity-ai"; + provider: Vapi.PerplexityAiCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/PerplexityAiCredentialProvider.ts b/src/api/types/PerplexityAiCredentialProvider.ts new file mode 100644 index 00000000..28b223f4 --- /dev/null +++ b/src/api/types/PerplexityAiCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const PerplexityAiCredentialProvider = { + PerplexityAi: "perplexity-ai", +} as const; +export type PerplexityAiCredentialProvider = + (typeof PerplexityAiCredentialProvider)[keyof typeof PerplexityAiCredentialProvider]; diff --git a/src/api/types/PerplexityAiModel.ts b/src/api/types/PerplexityAiModel.ts index ad9d5936..b48f5a21 100644 --- a/src/api/types/PerplexityAiModel.ts +++ b/src/api/types/PerplexityAiModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface PerplexityAiModel { /** This is the starting state for the conversation. */ @@ -21,7 +19,7 @@ export interface PerplexityAiModel { toolIds?: string[]; /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; - provider: "perplexity-ai"; + provider: Vapi.PerplexityAiModelProvider; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: string; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ diff --git a/src/api/types/PerplexityAiModelProvider.ts b/src/api/types/PerplexityAiModelProvider.ts new file mode 100644 index 00000000..5f1aa8fc --- /dev/null +++ b/src/api/types/PerplexityAiModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const PerplexityAiModelProvider = { + PerplexityAi: "perplexity-ai", +} as const; +export type PerplexityAiModelProvider = (typeof PerplexityAiModelProvider)[keyof typeof PerplexityAiModelProvider]; diff --git a/src/api/types/PerplexityAiModelToolsItem.ts b/src/api/types/PerplexityAiModelToolsItem.ts index 03f51feb..700cd466 100644 --- a/src/api/types/PerplexityAiModelToolsItem.ts +++ b/src/api/types/PerplexityAiModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type PerplexityAiModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/PhoneNumberCallEndingHookFilter.ts b/src/api/types/PhoneNumberCallEndingHookFilter.ts index 558a21b0..a993a39f 100644 --- a/src/api/types/PhoneNumberCallEndingHookFilter.ts +++ b/src/api/types/PhoneNumberCallEndingHookFilter.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface PhoneNumberCallEndingHookFilter { /** This is the type of filter - currently only "oneOf" is supported */ - type: "oneOf"; + type: Vapi.PhoneNumberCallEndingHookFilterType; /** This is the key to filter on - only "call.endedReason" is allowed for phone number call ending hooks */ - key: "call.endedReason"; + key: Vapi.PhoneNumberCallEndingHookFilterKey; /** This is the array of assistant-request related ended reasons to match against */ oneOf: Vapi.PhoneNumberCallEndingHookFilterOneOfItem[]; } diff --git a/src/api/types/PhoneNumberCallEndingHookFilterKey.ts b/src/api/types/PhoneNumberCallEndingHookFilterKey.ts new file mode 100644 index 00000000..20c5e666 --- /dev/null +++ b/src/api/types/PhoneNumberCallEndingHookFilterKey.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the key to filter on - only "call.endedReason" is allowed for phone number call ending hooks */ +export const PhoneNumberCallEndingHookFilterKey = { + CallEndedReason: "call.endedReason", +} as const; +export type PhoneNumberCallEndingHookFilterKey = + (typeof PhoneNumberCallEndingHookFilterKey)[keyof typeof PhoneNumberCallEndingHookFilterKey]; diff --git a/src/api/types/PhoneNumberCallEndingHookFilterOneOfItem.ts b/src/api/types/PhoneNumberCallEndingHookFilterOneOfItem.ts index 9e067068..165095a0 100644 --- a/src/api/types/PhoneNumberCallEndingHookFilterOneOfItem.ts +++ b/src/api/types/PhoneNumberCallEndingHookFilterOneOfItem.ts @@ -1,14 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type PhoneNumberCallEndingHookFilterOneOfItem = - | "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"; export const PhoneNumberCallEndingHookFilterOneOfItem = { AssistantRequestFailed: "assistant-request-failed", AssistantRequestReturnedError: "assistant-request-returned-error", @@ -17,3 +8,5 @@ export const PhoneNumberCallEndingHookFilterOneOfItem = { AssistantRequestReturnedNoAssistant: "assistant-request-returned-no-assistant", AssistantRequestReturnedForwardingPhoneNumber: "assistant-request-returned-forwarding-phone-number", } as const; +export type PhoneNumberCallEndingHookFilterOneOfItem = + (typeof PhoneNumberCallEndingHookFilterOneOfItem)[keyof typeof PhoneNumberCallEndingHookFilterOneOfItem]; diff --git a/src/api/types/PhoneNumberCallEndingHookFilterType.ts b/src/api/types/PhoneNumberCallEndingHookFilterType.ts new file mode 100644 index 00000000..ffa3ad58 --- /dev/null +++ b/src/api/types/PhoneNumberCallEndingHookFilterType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of filter - currently only "oneOf" is supported */ +export const PhoneNumberCallEndingHookFilterType = { + OneOf: "oneOf", +} as const; +export type PhoneNumberCallEndingHookFilterType = + (typeof PhoneNumberCallEndingHookFilterType)[keyof typeof PhoneNumberCallEndingHookFilterType]; diff --git a/src/api/types/PhoneNumberHookCallEnding.ts b/src/api/types/PhoneNumberHookCallEnding.ts index 1ec59f19..0998501c 100644 --- a/src/api/types/PhoneNumberHookCallEnding.ts +++ b/src/api/types/PhoneNumberHookCallEnding.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface PhoneNumberHookCallEnding { /** This is the event to trigger the hook on */ - on: "call.ending"; + on: Vapi.PhoneNumberHookCallEndingOn; /** Optional filters to decide when to trigger - restricted to assistant-request related ended reasons */ filters?: Vapi.PhoneNumberCallEndingHookFilter[]; /** This is the action to perform when the hook triggers */ diff --git a/src/api/types/PhoneNumberHookCallEndingDo.ts b/src/api/types/PhoneNumberHookCallEndingDo.ts index a3c7f7bb..5c305bfb 100644 --- a/src/api/types/PhoneNumberHookCallEndingDo.ts +++ b/src/api/types/PhoneNumberHookCallEndingDo.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the action to perform when the hook triggers diff --git a/src/api/types/PhoneNumberHookCallEndingOn.ts b/src/api/types/PhoneNumberHookCallEndingOn.ts new file mode 100644 index 00000000..af920a33 --- /dev/null +++ b/src/api/types/PhoneNumberHookCallEndingOn.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the event to trigger the hook on */ +export const PhoneNumberHookCallEndingOn = { + CallEnding: "call.ending", +} as const; +export type PhoneNumberHookCallEndingOn = + (typeof PhoneNumberHookCallEndingOn)[keyof typeof PhoneNumberHookCallEndingOn]; diff --git a/src/api/types/PhoneNumberHookCallRinging.ts b/src/api/types/PhoneNumberHookCallRinging.ts index 508e925d..f2427552 100644 --- a/src/api/types/PhoneNumberHookCallRinging.ts +++ b/src/api/types/PhoneNumberHookCallRinging.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface PhoneNumberHookCallRinging { /** This is the event to trigger the hook on */ - on: "call.ringing"; + on: Vapi.PhoneNumberHookCallRingingOn; /** Only the first action will be executed. Additional actions will be ignored. */ do: Vapi.PhoneNumberHookCallRingingDoItem[]; } diff --git a/src/api/types/PhoneNumberHookCallRingingDoItem.ts b/src/api/types/PhoneNumberHookCallRingingDoItem.ts index efdfae89..64bce801 100644 --- a/src/api/types/PhoneNumberHookCallRingingDoItem.ts +++ b/src/api/types/PhoneNumberHookCallRingingDoItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type PhoneNumberHookCallRingingDoItem = Vapi.TransferPhoneNumberHookAction | Vapi.SayPhoneNumberHookAction; diff --git a/src/api/types/PhoneNumberHookCallRingingOn.ts b/src/api/types/PhoneNumberHookCallRingingOn.ts new file mode 100644 index 00000000..babfaa9b --- /dev/null +++ b/src/api/types/PhoneNumberHookCallRingingOn.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the event to trigger the hook on */ +export const PhoneNumberHookCallRingingOn = { + CallRinging: "call.ringing", +} as const; +export type PhoneNumberHookCallRingingOn = + (typeof PhoneNumberHookCallRingingOn)[keyof typeof PhoneNumberHookCallRingingOn]; diff --git a/src/api/types/PhoneNumberPaginatedResponse.ts b/src/api/types/PhoneNumberPaginatedResponse.ts index 19082c46..94d13d64 100644 --- a/src/api/types/PhoneNumberPaginatedResponse.ts +++ b/src/api/types/PhoneNumberPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface PhoneNumberPaginatedResponse { /** A list of phone numbers, which can be of any provider type. */ diff --git a/src/api/types/PhoneNumberPaginatedResponseResultsItem.ts b/src/api/types/PhoneNumberPaginatedResponseResultsItem.ts index 36c5d388..80f9431f 100644 --- a/src/api/types/PhoneNumberPaginatedResponseResultsItem.ts +++ b/src/api/types/PhoneNumberPaginatedResponseResultsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type PhoneNumberPaginatedResponseResultsItem = | Vapi.ByoPhoneNumber diff --git a/src/api/types/PieInsight.ts b/src/api/types/PieInsight.ts new file mode 100644 index 00000000..e7e8b3cf --- /dev/null +++ b/src/api/types/PieInsight.ts @@ -0,0 +1,44 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface PieInsight { + /** This is the name of the Insight. */ + name?: string; + type: "pie"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + timeRange?: Vapi.InsightTimeRange; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.PieInsightGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.PieInsightQueriesItem[]; + /** This is the unique identifier for the Insight. */ + id: string; + /** This is the unique identifier for the org that this Insight belongs to. */ + orgId: string; + /** This is the ISO 8601 date-time string of when the Insight was created. */ + createdAt: string; + /** This is the ISO 8601 date-time string of when the Insight was last updated. */ + updatedAt: string; +} diff --git a/src/api/types/PieInsightFromCallTable.ts b/src/api/types/PieInsightFromCallTable.ts new file mode 100644 index 00000000..e9c36634 --- /dev/null +++ b/src/api/types/PieInsightFromCallTable.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface PieInsightFromCallTable { + /** This is the name of the Insight. */ + name?: string; + /** + * This is the type of the Insight. + * It is required to be `pie` to create a pie insight. + */ + type: Vapi.PieInsightFromCallTableType; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + timeRange?: Vapi.InsightTimeRange; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.PieInsightFromCallTableGroupBy; + /** These are the queries to run to generate the insight. */ + queries: Vapi.PieInsightFromCallTableQueriesItem[]; +} diff --git a/src/api/types/PieInsightFromCallTableGroupBy.ts b/src/api/types/PieInsightFromCallTableGroupBy.ts new file mode 100644 index 00000000..1b04c061 --- /dev/null +++ b/src/api/types/PieInsightFromCallTableGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const PieInsightFromCallTableGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type PieInsightFromCallTableGroupBy = + (typeof PieInsightFromCallTableGroupBy)[keyof typeof PieInsightFromCallTableGroupBy]; diff --git a/src/api/types/PieInsightFromCallTableQueriesItem.ts b/src/api/types/PieInsightFromCallTableQueriesItem.ts new file mode 100644 index 00000000..836d4c08 --- /dev/null +++ b/src/api/types/PieInsightFromCallTableQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type PieInsightFromCallTableQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/PieInsightFromCallTableType.ts b/src/api/types/PieInsightFromCallTableType.ts new file mode 100644 index 00000000..c5a81682 --- /dev/null +++ b/src/api/types/PieInsightFromCallTableType.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the Insight. + * It is required to be `pie` to create a pie insight. + */ +export const PieInsightFromCallTableType = { + Pie: "pie", +} as const; +export type PieInsightFromCallTableType = + (typeof PieInsightFromCallTableType)[keyof typeof PieInsightFromCallTableType]; diff --git a/src/api/types/PieInsightGroupBy.ts b/src/api/types/PieInsightGroupBy.ts new file mode 100644 index 00000000..aac14b44 --- /dev/null +++ b/src/api/types/PieInsightGroupBy.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const PieInsightGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type PieInsightGroupBy = (typeof PieInsightGroupBy)[keyof typeof PieInsightGroupBy]; diff --git a/src/api/types/PieInsightQueriesItem.ts b/src/api/types/PieInsightQueriesItem.ts new file mode 100644 index 00000000..d149ed8e --- /dev/null +++ b/src/api/types/PieInsightQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type PieInsightQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/PlayHtCredential.ts b/src/api/types/PlayHtCredential.ts index 1a3eeefe..973cb388 100644 --- a/src/api/types/PlayHtCredential.ts +++ b/src/api/types/PlayHtCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface PlayHtCredential { - provider: "playht"; + provider: Vapi.PlayHtCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/PlayHtCredentialProvider.ts b/src/api/types/PlayHtCredentialProvider.ts new file mode 100644 index 00000000..45e397e4 --- /dev/null +++ b/src/api/types/PlayHtCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const PlayHtCredentialProvider = { + Playht: "playht", +} as const; +export type PlayHtCredentialProvider = (typeof PlayHtCredentialProvider)[keyof typeof PlayHtCredentialProvider]; diff --git a/src/api/types/PlayHtVoice.ts b/src/api/types/PlayHtVoice.ts index 5e5de3fe..13eaa08c 100644 --- a/src/api/types/PlayHtVoice.ts +++ b/src/api/types/PlayHtVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface PlayHtVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "playht"; + provider: Vapi.PlayHtVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.PlayHtVoiceId; /** This is the speed multiplier that will be used. */ diff --git a/src/api/types/PlayHtVoiceEmotion.ts b/src/api/types/PlayHtVoiceEmotion.ts index a2fc5a5b..a74cc92b 100644 --- a/src/api/types/PlayHtVoiceEmotion.ts +++ b/src/api/types/PlayHtVoiceEmotion.ts @@ -1,23 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * An emotion to be applied to the speech. - */ -export type PlayHtVoiceEmotion = - | "female_happy" - | "female_sad" - | "female_angry" - | "female_fearful" - | "female_disgust" - | "female_surprised" - | "male_happy" - | "male_sad" - | "male_angry" - | "male_fearful" - | "male_disgust" - | "male_surprised"; +/** An emotion to be applied to the speech. */ export const PlayHtVoiceEmotion = { FemaleHappy: "female_happy", FemaleSad: "female_sad", @@ -32,3 +15,4 @@ export const PlayHtVoiceEmotion = { MaleDisgust: "male_disgust", MaleSurprised: "male_surprised", } as const; +export type PlayHtVoiceEmotion = (typeof PlayHtVoiceEmotion)[keyof typeof PlayHtVoiceEmotion]; diff --git a/src/api/types/PlayHtVoiceId.ts b/src/api/types/PlayHtVoiceId.ts index 9b912de1..684d61b5 100644 --- a/src/api/types/PlayHtVoiceId.ts +++ b/src/api/types/PlayHtVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/PlayHtVoiceIdEnum.ts b/src/api/types/PlayHtVoiceIdEnum.ts index c16ec37b..c8239adf 100644 --- a/src/api/types/PlayHtVoiceIdEnum.ts +++ b/src/api/types/PlayHtVoiceIdEnum.ts @@ -1,18 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type PlayHtVoiceIdEnum = - | "jennifer" - | "melissa" - | "will" - | "chris" - | "matt" - | "jack" - | "ruby" - | "davis" - | "donna" - | "michael"; export const PlayHtVoiceIdEnum = { Jennifer: "jennifer", Melissa: "melissa", @@ -25,3 +12,4 @@ export const PlayHtVoiceIdEnum = { Donna: "donna", Michael: "michael", } as const; +export type PlayHtVoiceIdEnum = (typeof PlayHtVoiceIdEnum)[keyof typeof PlayHtVoiceIdEnum]; diff --git a/src/api/types/PlayHtVoiceLanguage.ts b/src/api/types/PlayHtVoiceLanguage.ts index 0a890504..91c5900f 100644 --- a/src/api/types/PlayHtVoiceLanguage.ts +++ b/src/api/types/PlayHtVoiceLanguage.ts @@ -1,48 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The language to use for the speech. - */ -export type PlayHtVoiceLanguage = - | "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"; +/** The language to use for the speech. */ export const PlayHtVoiceLanguage = { Afrikaans: "afrikaans", Albanian: "albanian", @@ -82,3 +40,4 @@ export const PlayHtVoiceLanguage = { Urdu: "urdu", Xhosa: "xhosa", } as const; +export type PlayHtVoiceLanguage = (typeof PlayHtVoiceLanguage)[keyof typeof PlayHtVoiceLanguage]; diff --git a/src/api/types/PlayHtVoiceModel.ts b/src/api/types/PlayHtVoiceModel.ts index 572e0849..0bec1381 100644 --- a/src/api/types/PlayHtVoiceModel.ts +++ b/src/api/types/PlayHtVoiceModel.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Playht voice model/engine to use. - */ -export type PlayHtVoiceModel = "PlayHT2.0" | "PlayHT2.0-turbo" | "Play3.0-mini" | "PlayDialog"; +/** Playht voice model/engine to use. */ export const PlayHtVoiceModel = { PlayHt20: "PlayHT2.0", PlayHt20Turbo: "PlayHT2.0-turbo", Play30Mini: "Play3.0-mini", PlayDialog: "PlayDialog", } as const; +export type PlayHtVoiceModel = (typeof PlayHtVoiceModel)[keyof typeof PlayHtVoiceModel]; diff --git a/src/api/types/PlayHtVoiceProvider.ts b/src/api/types/PlayHtVoiceProvider.ts new file mode 100644 index 00000000..3596b474 --- /dev/null +++ b/src/api/types/PlayHtVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const PlayHtVoiceProvider = { + Playht: "playht", +} as const; +export type PlayHtVoiceProvider = (typeof PlayHtVoiceProvider)[keyof typeof PlayHtVoiceProvider]; diff --git a/src/api/types/PromptInjectionSecurityFilter.ts b/src/api/types/PromptInjectionSecurityFilter.ts index 87c0e03f..8b08c5e7 100644 --- a/src/api/types/PromptInjectionSecurityFilter.ts +++ b/src/api/types/PromptInjectionSecurityFilter.ts @@ -1,8 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface PromptInjectionSecurityFilter { /** The type of security threat to filter. */ - type: "prompt-injection"; + type: Vapi.PromptInjectionSecurityFilterType; } diff --git a/src/api/types/PromptInjectionSecurityFilterType.ts b/src/api/types/PromptInjectionSecurityFilterType.ts new file mode 100644 index 00000000..aaca40d8 --- /dev/null +++ b/src/api/types/PromptInjectionSecurityFilterType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of security threat to filter. */ +export const PromptInjectionSecurityFilterType = { + PromptInjection: "prompt-injection", +} as const; +export type PromptInjectionSecurityFilterType = + (typeof PromptInjectionSecurityFilterType)[keyof typeof PromptInjectionSecurityFilterType]; diff --git a/src/api/types/ProviderResource.ts b/src/api/types/ProviderResource.ts index fe25c79a..29e2cfe3 100644 --- a/src/api/types/ProviderResource.ts +++ b/src/api/types/ProviderResource.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ProviderResource { /** This is the unique identifier for the provider resource. */ @@ -14,9 +12,9 @@ export interface ProviderResource { /** This is the ISO 8601 date-time string of when the provider resource was last updated. */ updatedAt: string; /** This is the provider that manages this resource. */ - provider: "11labs"; + provider: Vapi.ProviderResourceProvider; /** This is the name/type of the resource. */ - resourceName: "pronunciation-dictionary"; + resourceName: Vapi.ProviderResourceResourceName; /** This is the provider-specific identifier for the resource. */ resourceId: string; /** This is the full resource data from the provider's API. */ diff --git a/src/api/types/ProviderResourcePaginatedResponse.ts b/src/api/types/ProviderResourcePaginatedResponse.ts index a3935727..a2e9165a 100644 --- a/src/api/types/ProviderResourcePaginatedResponse.ts +++ b/src/api/types/ProviderResourcePaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ProviderResourcePaginatedResponse { results: Vapi.ProviderResource[]; diff --git a/src/api/types/ProviderResourceProvider.ts b/src/api/types/ProviderResourceProvider.ts new file mode 100644 index 00000000..101b785c --- /dev/null +++ b/src/api/types/ProviderResourceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider that manages this resource. */ +export const ProviderResourceProvider = { + ElevenLabs: "11labs", +} as const; +export type ProviderResourceProvider = (typeof ProviderResourceProvider)[keyof typeof ProviderResourceProvider]; diff --git a/src/api/types/ProviderResourceResourceName.ts b/src/api/types/ProviderResourceResourceName.ts new file mode 100644 index 00000000..56b0678c --- /dev/null +++ b/src/api/types/ProviderResourceResourceName.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the name/type of the resource. */ +export const ProviderResourceResourceName = { + PronunciationDictionary: "pronunciation-dictionary", +} as const; +export type ProviderResourceResourceName = + (typeof ProviderResourceResourceName)[keyof typeof ProviderResourceResourceName]; diff --git a/src/api/types/PunctuationBoundary.ts b/src/api/types/PunctuationBoundary.ts index c04d1e82..f2e835fa 100644 --- a/src/api/types/PunctuationBoundary.ts +++ b/src/api/types/PunctuationBoundary.ts @@ -1,67 +1,50 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type PunctuationBoundary = +export const PunctuationBoundary = { /** * 。 */ - | "\u3002" + Circle: "\u3002", /** * , */ - | "\uFF0C" + FullWidthComma: "\uFF0C", /** * . */ - | "." + Dot: ".", /** * ! */ - | "!" + Exclamation: "!", /** * ? */ - | "?" + Question: "?", /** * ; */ - | ";" + Semicolon: ";", /** * ) */ - | ")" + Parenthesis: ")", /** * ، */ - | "\u060C" + ArabicComma: "\u060C", /** * ۔ */ - | "\u06D4" + UrduFullStop: "\u06D4", /** * । */ - | "\u0964" + BengaliFullStop: "\u0964", /** * ॥ */ - | "\u0965" + DoubleDanda: "\u0965", /** * | */ - | "|" + Pipe: "|", /** * || */ - | "||" + DoublePipe: "||", /** * , */ - | "," + HalfWidthComma: ",", /** * : */ - | ":"; -export const PunctuationBoundary = { - Circle: "\u3002", - FullWidthComma: "\uFF0C", - Dot: ".", - Exclamation: "!", - Question: "?", - Semicolon: ";", - Parenthesis: ")", - ArabicComma: "\u060C", - UrduFullStop: "\u06D4", - BengaliFullStop: "\u0964", - DoubleDanda: "\u0965", - Pipe: "|", - DoublePipe: "||", - HalfWidthComma: ",", Colon: ":", } as const; +export type PunctuationBoundary = (typeof PunctuationBoundary)[keyof typeof PunctuationBoundary]; diff --git a/src/api/types/QueryTool.ts b/src/api/types/QueryTool.ts index ec059478..151df826 100644 --- a/src/api/types/QueryTool.ts +++ b/src/api/types/QueryTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface QueryTool { /** diff --git a/src/api/types/QueryToolMessagesItem.ts b/src/api/types/QueryToolMessagesItem.ts index 73dabeee..f6c2088d 100644 --- a/src/api/types/QueryToolMessagesItem.ts +++ b/src/api/types/QueryToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type QueryToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/RceSecurityFilter.ts b/src/api/types/RceSecurityFilter.ts index 97eee439..b21970e6 100644 --- a/src/api/types/RceSecurityFilter.ts +++ b/src/api/types/RceSecurityFilter.ts @@ -1,8 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface RceSecurityFilter { /** The type of security threat to filter. */ - type: "rce"; + type: Vapi.RceSecurityFilterType; } diff --git a/src/api/types/RceSecurityFilterType.ts b/src/api/types/RceSecurityFilterType.ts new file mode 100644 index 00000000..418eca15 --- /dev/null +++ b/src/api/types/RceSecurityFilterType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of security threat to filter. */ +export const RceSecurityFilterType = { + Rce: "rce", +} as const; +export type RceSecurityFilterType = (typeof RceSecurityFilterType)[keyof typeof RceSecurityFilterType]; diff --git a/src/api/types/Recording.ts b/src/api/types/Recording.ts index 043c5036..a365a15c 100644 --- a/src/api/types/Recording.ts +++ b/src/api/types/Recording.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Recording { /** This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */ diff --git a/src/api/types/RecordingConsent.ts b/src/api/types/RecordingConsent.ts index 34990991..da4c1446 100644 --- a/src/api/types/RecordingConsent.ts +++ b/src/api/types/RecordingConsent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface RecordingConsent { /** This is the type of recording consent. */ diff --git a/src/api/types/RecordingConsentPlanStayOnLine.ts b/src/api/types/RecordingConsentPlanStayOnLine.ts index 433dd718..af55d35d 100644 --- a/src/api/types/RecordingConsentPlanStayOnLine.ts +++ b/src/api/types/RecordingConsentPlanStayOnLine.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface RecordingConsentPlanStayOnLine { /** diff --git a/src/api/types/RecordingConsentPlanStayOnLineVoice.ts b/src/api/types/RecordingConsentPlanStayOnLineVoice.ts index 050145d6..cc5b83f3 100644 --- a/src/api/types/RecordingConsentPlanStayOnLineVoice.ts +++ b/src/api/types/RecordingConsentPlanStayOnLineVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. diff --git a/src/api/types/RecordingConsentPlanVerbal.ts b/src/api/types/RecordingConsentPlanVerbal.ts index fac4c3fd..76b4898e 100644 --- a/src/api/types/RecordingConsentPlanVerbal.ts +++ b/src/api/types/RecordingConsentPlanVerbal.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface RecordingConsentPlanVerbal { /** diff --git a/src/api/types/RecordingConsentPlanVerbalVoice.ts b/src/api/types/RecordingConsentPlanVerbalVoice.ts index 30342e8c..dc58d113 100644 --- a/src/api/types/RecordingConsentPlanVerbalVoice.ts +++ b/src/api/types/RecordingConsentPlanVerbalVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voice to use for the consent message. If not specified, inherits from the assistant's voice. diff --git a/src/api/types/RegexCondition.ts b/src/api/types/RegexCondition.ts index cf48d3f8..7d906dfc 100644 --- a/src/api/types/RegexCondition.ts +++ b/src/api/types/RegexCondition.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface RegexCondition { /** This is the type discriminator for regex condition */ - type: "regex"; + type: Vapi.RegexConditionType; /** * This is the regular expression pattern to match against message content. * diff --git a/src/api/types/RegexConditionType.ts b/src/api/types/RegexConditionType.ts new file mode 100644 index 00000000..e8e20818 --- /dev/null +++ b/src/api/types/RegexConditionType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type discriminator for regex condition */ +export const RegexConditionType = { + Regex: "regex", +} as const; +export type RegexConditionType = (typeof RegexConditionType)[keyof typeof RegexConditionType]; diff --git a/src/api/types/RegexOption.ts b/src/api/types/RegexOption.ts index 918f9ef1..5dca3a7d 100644 --- a/src/api/types/RegexOption.ts +++ b/src/api/types/RegexOption.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface RegexOption { /** diff --git a/src/api/types/RegexOptionType.ts b/src/api/types/RegexOptionType.ts index 4a746fe9..73382e1b 100644 --- a/src/api/types/RegexOptionType.ts +++ b/src/api/types/RegexOptionType.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the type of the regex option. Options are: @@ -8,9 +6,9 @@ * - `whole-word`: Matches whole words only. * - `multi-line`: Matches across multiple lines. */ -export type RegexOptionType = "ignore-case" | "whole-word" | "multi-line"; export const RegexOptionType = { IgnoreCase: "ignore-case", WholeWord: "whole-word", MultiLine: "multi-line", } as const; +export type RegexOptionType = (typeof RegexOptionType)[keyof typeof RegexOptionType]; diff --git a/src/api/types/RegexReplacement.ts b/src/api/types/RegexReplacement.ts index 294739a0..bfd31613 100644 --- a/src/api/types/RegexReplacement.ts +++ b/src/api/types/RegexReplacement.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface RegexReplacement { /** @@ -15,7 +13,7 @@ export interface RegexReplacement { * - 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() } */ - type: "regex"; + type: Vapi.RegexReplacementType; /** * This is the regex pattern to replace. * diff --git a/src/api/types/RegexReplacementType.ts b/src/api/types/RegexReplacementType.ts new file mode 100644 index 00000000..553a4d59 --- /dev/null +++ b/src/api/types/RegexReplacementType.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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() } + */ +export const RegexReplacementType = { + Regex: "regex", +} as const; +export type RegexReplacementType = (typeof RegexReplacementType)[keyof typeof RegexReplacementType]; diff --git a/src/api/types/RegexSecurityFilter.ts b/src/api/types/RegexSecurityFilter.ts index e9f71cc1..66805170 100644 --- a/src/api/types/RegexSecurityFilter.ts +++ b/src/api/types/RegexSecurityFilter.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface RegexSecurityFilter { /** The type of security threat to filter. */ - type: "regex"; + type: Vapi.RegexSecurityFilterType; /** The regex pattern to filter. */ regex: string; } diff --git a/src/api/types/RegexSecurityFilterType.ts b/src/api/types/RegexSecurityFilterType.ts new file mode 100644 index 00000000..d843617f --- /dev/null +++ b/src/api/types/RegexSecurityFilterType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of security threat to filter. */ +export const RegexSecurityFilterType = { + Regex: "regex", +} as const; +export type RegexSecurityFilterType = (typeof RegexSecurityFilterType)[keyof typeof RegexSecurityFilterType]; diff --git a/src/api/types/ResponseCompletedEvent.ts b/src/api/types/ResponseCompletedEvent.ts index b666b347..9ade259e 100644 --- a/src/api/types/ResponseCompletedEvent.ts +++ b/src/api/types/ResponseCompletedEvent.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ResponseCompletedEvent { /** The completed response */ response: Vapi.ResponseObject; /** Event type */ - type: "response.completed"; + type: Vapi.ResponseCompletedEventType; } diff --git a/src/api/types/ResponseCompletedEventType.ts b/src/api/types/ResponseCompletedEventType.ts new file mode 100644 index 00000000..77996e7d --- /dev/null +++ b/src/api/types/ResponseCompletedEventType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Event type */ +export const ResponseCompletedEventType = { + ResponseCompleted: "response.completed", +} as const; +export type ResponseCompletedEventType = (typeof ResponseCompletedEventType)[keyof typeof ResponseCompletedEventType]; diff --git a/src/api/types/ResponseErrorEvent.ts b/src/api/types/ResponseErrorEvent.ts index 4fc62db5..c603318b 100644 --- a/src/api/types/ResponseErrorEvent.ts +++ b/src/api/types/ResponseErrorEvent.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ResponseErrorEvent { /** Event type */ - type: "error"; + type: Vapi.ResponseErrorEventType; /** Error code */ code: string; /** Error message */ diff --git a/src/api/types/ResponseErrorEventType.ts b/src/api/types/ResponseErrorEventType.ts new file mode 100644 index 00000000..9d005cb3 --- /dev/null +++ b/src/api/types/ResponseErrorEventType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Event type */ +export const ResponseErrorEventType = { + Error: "error", +} as const; +export type ResponseErrorEventType = (typeof ResponseErrorEventType)[keyof typeof ResponseErrorEventType]; diff --git a/src/api/types/ResponseObject.ts b/src/api/types/ResponseObject.ts index 20b12ded..e83be40d 100644 --- a/src/api/types/ResponseObject.ts +++ b/src/api/types/ResponseObject.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ResponseObject { /** Unique identifier for this Response */ id: string; /** The object type */ - object: "response"; + object: Vapi.ResponseObjectObject; /** Unix timestamp (in seconds) of when this Response was created */ created_at: number; /** Status of the response */ diff --git a/src/api/types/ResponseObjectObject.ts b/src/api/types/ResponseObjectObject.ts new file mode 100644 index 00000000..125317e6 --- /dev/null +++ b/src/api/types/ResponseObjectObject.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The object type */ +export const ResponseObjectObject = { + Response: "response", +} as const; +export type ResponseObjectObject = (typeof ResponseObjectObject)[keyof typeof ResponseObjectObject]; diff --git a/src/api/types/ResponseObjectStatus.ts b/src/api/types/ResponseObjectStatus.ts index 58e7fdbd..6812ec7c 100644 --- a/src/api/types/ResponseObjectStatus.ts +++ b/src/api/types/ResponseObjectStatus.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Status of the response - */ -export type ResponseObjectStatus = "completed" | "failed" | "in_progress" | "incomplete"; +/** Status of the response */ export const ResponseObjectStatus = { Completed: "completed", Failed: "failed", InProgress: "in_progress", Incomplete: "incomplete", } as const; +export type ResponseObjectStatus = (typeof ResponseObjectStatus)[keyof typeof ResponseObjectStatus]; diff --git a/src/api/types/ResponseOutputMessage.ts b/src/api/types/ResponseOutputMessage.ts index 403626e7..33aaf2e8 100644 --- a/src/api/types/ResponseOutputMessage.ts +++ b/src/api/types/ResponseOutputMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ResponseOutputMessage { /** The unique ID of the output message */ @@ -10,9 +8,9 @@ export interface ResponseOutputMessage { /** Content of the output message */ content: Vapi.ResponseOutputText[]; /** The role of the output message */ - role: "assistant"; + role: Vapi.ResponseOutputMessageRole; /** The status of the message */ status: Vapi.ResponseOutputMessageStatus; /** The type of the output message */ - type: "message"; + type: Vapi.ResponseOutputMessageType; } diff --git a/src/api/types/ResponseOutputMessageRole.ts b/src/api/types/ResponseOutputMessageRole.ts new file mode 100644 index 00000000..e15250a3 --- /dev/null +++ b/src/api/types/ResponseOutputMessageRole.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The role of the output message */ +export const ResponseOutputMessageRole = { + Assistant: "assistant", +} as const; +export type ResponseOutputMessageRole = (typeof ResponseOutputMessageRole)[keyof typeof ResponseOutputMessageRole]; diff --git a/src/api/types/ResponseOutputMessageStatus.ts b/src/api/types/ResponseOutputMessageStatus.ts index ef8d62cc..4bc3d604 100644 --- a/src/api/types/ResponseOutputMessageStatus.ts +++ b/src/api/types/ResponseOutputMessageStatus.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The status of the message - */ -export type ResponseOutputMessageStatus = "in_progress" | "completed" | "incomplete"; +/** The status of the message */ export const ResponseOutputMessageStatus = { InProgress: "in_progress", Completed: "completed", Incomplete: "incomplete", } as const; +export type ResponseOutputMessageStatus = + (typeof ResponseOutputMessageStatus)[keyof typeof ResponseOutputMessageStatus]; diff --git a/src/api/types/ResponseOutputMessageType.ts b/src/api/types/ResponseOutputMessageType.ts new file mode 100644 index 00000000..a733eb07 --- /dev/null +++ b/src/api/types/ResponseOutputMessageType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of the output message */ +export const ResponseOutputMessageType = { + Message: "message", +} as const; +export type ResponseOutputMessageType = (typeof ResponseOutputMessageType)[keyof typeof ResponseOutputMessageType]; diff --git a/src/api/types/ResponseOutputText.ts b/src/api/types/ResponseOutputText.ts index 004d6975..5b170fc9 100644 --- a/src/api/types/ResponseOutputText.ts +++ b/src/api/types/ResponseOutputText.ts @@ -1,6 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ResponseOutputText { /** Annotations in the text output */ @@ -8,5 +8,5 @@ export interface ResponseOutputText { /** The text output from the model */ text: string; /** The type of the output text */ - type: "output_text"; + type: Vapi.ResponseOutputTextType; } diff --git a/src/api/types/ResponseOutputTextType.ts b/src/api/types/ResponseOutputTextType.ts new file mode 100644 index 00000000..704db6f0 --- /dev/null +++ b/src/api/types/ResponseOutputTextType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of the output text */ +export const ResponseOutputTextType = { + OutputText: "output_text", +} as const; +export type ResponseOutputTextType = (typeof ResponseOutputTextType)[keyof typeof ResponseOutputTextType]; diff --git a/src/api/types/ResponseTextDeltaEvent.ts b/src/api/types/ResponseTextDeltaEvent.ts index fc3912f7..fe9b6b6a 100644 --- a/src/api/types/ResponseTextDeltaEvent.ts +++ b/src/api/types/ResponseTextDeltaEvent.ts @@ -1,6 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ResponseTextDeltaEvent { /** Index of the content part */ @@ -12,5 +12,5 @@ export interface ResponseTextDeltaEvent { /** Index of the output item */ output_index: number; /** Event type */ - type: "response.output_text.delta"; + type: Vapi.ResponseTextDeltaEventType; } diff --git a/src/api/types/ResponseTextDeltaEventType.ts b/src/api/types/ResponseTextDeltaEventType.ts new file mode 100644 index 00000000..7eddee53 --- /dev/null +++ b/src/api/types/ResponseTextDeltaEventType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Event type */ +export const ResponseTextDeltaEventType = { + ResponseOutputTextDelta: "response.output_text.delta", +} as const; +export type ResponseTextDeltaEventType = (typeof ResponseTextDeltaEventType)[keyof typeof ResponseTextDeltaEventType]; diff --git a/src/api/types/ResponseTextDoneEvent.ts b/src/api/types/ResponseTextDoneEvent.ts index 63fcc25b..a57f1b9e 100644 --- a/src/api/types/ResponseTextDoneEvent.ts +++ b/src/api/types/ResponseTextDoneEvent.ts @@ -1,6 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ResponseTextDoneEvent { /** Index of the content part */ @@ -12,5 +12,5 @@ export interface ResponseTextDoneEvent { /** Complete text content */ text: string; /** Event type */ - type: "response.output_text.done"; + type: Vapi.ResponseTextDoneEventType; } diff --git a/src/api/types/ResponseTextDoneEventType.ts b/src/api/types/ResponseTextDoneEventType.ts new file mode 100644 index 00000000..f05baa28 --- /dev/null +++ b/src/api/types/ResponseTextDoneEventType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Event type */ +export const ResponseTextDoneEventType = { + ResponseOutputTextDone: "response.output_text.done", +} as const; +export type ResponseTextDoneEventType = (typeof ResponseTextDoneEventType)[keyof typeof ResponseTextDoneEventType]; diff --git a/src/api/types/RimeAiCredential.ts b/src/api/types/RimeAiCredential.ts index 66792b14..544edcba 100644 --- a/src/api/types/RimeAiCredential.ts +++ b/src/api/types/RimeAiCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface RimeAiCredential { - provider: "rime-ai"; + provider: Vapi.RimeAiCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/RimeAiCredentialProvider.ts b/src/api/types/RimeAiCredentialProvider.ts new file mode 100644 index 00000000..89b8d8c0 --- /dev/null +++ b/src/api/types/RimeAiCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const RimeAiCredentialProvider = { + RimeAi: "rime-ai", +} as const; +export type RimeAiCredentialProvider = (typeof RimeAiCredentialProvider)[keyof typeof RimeAiCredentialProvider]; diff --git a/src/api/types/RimeAiVoice.ts b/src/api/types/RimeAiVoice.ts index 14f8b097..cdca365c 100644 --- a/src/api/types/RimeAiVoice.ts +++ b/src/api/types/RimeAiVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface RimeAiVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "rime-ai"; + provider: Vapi.RimeAiVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.RimeAiVoiceId; /** This is the model that will be used. Defaults to 'arcana' when not specified. */ diff --git a/src/api/types/RimeAiVoiceId.ts b/src/api/types/RimeAiVoiceId.ts index 81329bf5..2cadcd03 100644 --- a/src/api/types/RimeAiVoiceId.ts +++ b/src/api/types/RimeAiVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/RimeAiVoiceIdEnum.ts b/src/api/types/RimeAiVoiceIdEnum.ts index 763d847d..5d6be2be 100644 --- a/src/api/types/RimeAiVoiceIdEnum.ts +++ b/src/api/types/RimeAiVoiceIdEnum.ts @@ -1,99 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type RimeAiVoiceIdEnum = - | "abbie" - | "allison" - | "ally" - | "alona" - | "amber" - | "ana" - | "antoine" - | "armon" - | "brenda" - | "brittany" - | "carol" - | "colin" - | "courtney" - | "elena" - | "elliot" - | "eva" - | "geoff" - | "gerald" - | "hank" - | "helen" - | "hera" - | "jen" - | "joe" - | "joy" - | "juan" - | "kendra" - | "kendrick" - | "kenneth" - | "kevin" - | "kris" - | "linda" - | "madison" - | "marge" - | "marina" - | "marissa" - | "marta" - | "maya" - | "nicholas" - | "nyles" - | "phil" - | "reba" - | "rex" - | "rick" - | "ritu" - | "rob" - | "rodney" - | "rohan" - | "rosco" - | "samantha" - | "sandy" - | "selena" - | "seth" - | "sharon" - | "stan" - | "tamra" - | "tanya" - | "tibur" - | "tj" - | "tyler" - | "viv" - | "yadira" - | "marsh" - | "bayou" - | "creek" - | "brook" - | "flower" - | "spore" - | "glacier" - | "gulch" - | "alpine" - | "cove" - | "lagoon" - | "tundra" - | "steppe" - | "mesa" - | "grove" - | "rainforest" - | "moraine" - | "wildflower" - | "peak" - | "boulder" - | "gypsum" - | "zest" - | "luna" - | "celeste" - | "orion" - | "ursa" - | "astra" - | "esther" - | "estelle" - | "andromeda"; export const RimeAiVoiceIdEnum = { Abbie: "abbie", Allison: "allison", @@ -187,3 +93,4 @@ export const RimeAiVoiceIdEnum = { Estelle: "estelle", Andromeda: "andromeda", } as const; +export type RimeAiVoiceIdEnum = (typeof RimeAiVoiceIdEnum)[keyof typeof RimeAiVoiceIdEnum]; diff --git a/src/api/types/RimeAiVoiceModel.ts b/src/api/types/RimeAiVoiceModel.ts index cf53af5c..12fd07e1 100644 --- a/src/api/types/RimeAiVoiceModel.ts +++ b/src/api/types/RimeAiVoiceModel.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the model that will be used. Defaults to 'arcana' when not specified. - */ -export type RimeAiVoiceModel = "arcana" | "mistv2" | "mist"; +/** This is the model that will be used. Defaults to 'arcana' when not specified. */ export const RimeAiVoiceModel = { Arcana: "arcana", Mistv2: "mistv2", Mist: "mist", } as const; +export type RimeAiVoiceModel = (typeof RimeAiVoiceModel)[keyof typeof RimeAiVoiceModel]; diff --git a/src/api/types/RimeAiVoiceProvider.ts b/src/api/types/RimeAiVoiceProvider.ts new file mode 100644 index 00000000..a57954ea --- /dev/null +++ b/src/api/types/RimeAiVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const RimeAiVoiceProvider = { + RimeAi: "rime-ai", +} as const; +export type RimeAiVoiceProvider = (typeof RimeAiVoiceProvider)[keyof typeof RimeAiVoiceProvider]; diff --git a/src/api/types/RunpodCredential.ts b/src/api/types/RunpodCredential.ts index f36e8f77..bc6a1671 100644 --- a/src/api/types/RunpodCredential.ts +++ b/src/api/types/RunpodCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface RunpodCredential { - provider: "runpod"; + provider: Vapi.RunpodCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/RunpodCredentialProvider.ts b/src/api/types/RunpodCredentialProvider.ts new file mode 100644 index 00000000..31d88bd1 --- /dev/null +++ b/src/api/types/RunpodCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const RunpodCredentialProvider = { + Runpod: "runpod", +} as const; +export type RunpodCredentialProvider = (typeof RunpodCredentialProvider)[keyof typeof RunpodCredentialProvider]; diff --git a/src/api/types/S3Credential.ts b/src/api/types/S3Credential.ts index f467a3ff..d96363d5 100644 --- a/src/api/types/S3Credential.ts +++ b/src/api/types/S3Credential.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface S3Credential { /** Credential provider. Only allowed value is s3 */ - provider: "s3"; + provider: Vapi.S3CredentialProvider; /** AWS access key ID. */ awsAccessKeyId: string; /** AWS access key secret. This is not returned in the API. */ diff --git a/src/api/types/S3CredentialProvider.ts b/src/api/types/S3CredentialProvider.ts new file mode 100644 index 00000000..bb2d6097 --- /dev/null +++ b/src/api/types/S3CredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Credential provider. Only allowed value is s3 */ +export const S3CredentialProvider = { + S3: "s3", +} as const; +export type S3CredentialProvider = (typeof S3CredentialProvider)[keyof typeof S3CredentialProvider]; diff --git a/src/api/types/SayAssistantHookAction.ts b/src/api/types/SayAssistantHookAction.ts index 49637922..279fcf99 100644 --- a/src/api/types/SayAssistantHookAction.ts +++ b/src/api/types/SayAssistantHookAction.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type SayAssistantHookAction = unknown; diff --git a/src/api/types/SayHookAction.ts b/src/api/types/SayHookAction.ts index 0dcd8423..07988365 100644 --- a/src/api/types/SayHookAction.ts +++ b/src/api/types/SayHookAction.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SayHookAction { /** This is the type of action - must be "say" */ - type: "say"; + type: Vapi.SayHookActionType; /** * 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. diff --git a/src/api/types/SayHookActionPrompt.ts b/src/api/types/SayHookActionPrompt.ts index c50dfb56..a2c58d3e 100644 --- a/src/api/types/SayHookActionPrompt.ts +++ b/src/api/types/SayHookActionPrompt.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * 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. */ -export type SayHookActionPrompt = string | Vapi.SayHookActionPromptItem[]; +export type SayHookActionPrompt = string | Vapi.SayHookActionPromptOneItem[]; diff --git a/src/api/types/SayHookActionPromptItem.ts b/src/api/types/SayHookActionPromptItem.ts deleted file mode 100644 index 7573d31c..00000000 --- a/src/api/types/SayHookActionPromptItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index.js"; - -export type SayHookActionPromptItem = - | Vapi.SystemMessage - | Vapi.UserMessage - | Vapi.AssistantMessage - | Vapi.ToolMessage - | Vapi.DeveloperMessage; diff --git a/src/api/types/SayHookActionPromptOneItem.ts b/src/api/types/SayHookActionPromptOneItem.ts new file mode 100644 index 00000000..6a137ba7 --- /dev/null +++ b/src/api/types/SayHookActionPromptOneItem.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type SayHookActionPromptOneItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/SayHookActionType.ts b/src/api/types/SayHookActionType.ts new file mode 100644 index 00000000..6d280ded --- /dev/null +++ b/src/api/types/SayHookActionType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of action - must be "say" */ +export const SayHookActionType = { + Say: "say", +} as const; +export type SayHookActionType = (typeof SayHookActionType)[keyof typeof SayHookActionType]; diff --git a/src/api/types/SayPhoneNumberHookAction.ts b/src/api/types/SayPhoneNumberHookAction.ts index 2c45f13e..1e8aee65 100644 --- a/src/api/types/SayPhoneNumberHookAction.ts +++ b/src/api/types/SayPhoneNumberHookAction.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface SayPhoneNumberHookAction { /** This is the type of action - must be "say" */ - type: "say"; + type: Vapi.SayPhoneNumberHookActionType; /** This is the message to say */ exact: string; } diff --git a/src/api/types/SayPhoneNumberHookActionType.ts b/src/api/types/SayPhoneNumberHookActionType.ts new file mode 100644 index 00000000..1de669f8 --- /dev/null +++ b/src/api/types/SayPhoneNumberHookActionType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of action - must be "say" */ +export const SayPhoneNumberHookActionType = { + Say: "say", +} as const; +export type SayPhoneNumberHookActionType = + (typeof SayPhoneNumberHookActionType)[keyof typeof SayPhoneNumberHookActionType]; diff --git a/src/api/types/SbcConfiguration.ts b/src/api/types/SbcConfiguration.ts index 2001bb58..e16bc574 100644 --- a/src/api/types/SbcConfiguration.ts +++ b/src/api/types/SbcConfiguration.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export interface SbcConfiguration {} +export type SbcConfiguration = {}; diff --git a/src/api/types/SchedulePlan.ts b/src/api/types/SchedulePlan.ts index d98e5d05..f2564b09 100644 --- a/src/api/types/SchedulePlan.ts +++ b/src/api/types/SchedulePlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SchedulePlan { /** This is the ISO 8601 date-time string of the earliest time the call can be scheduled. */ diff --git a/src/api/types/Scorecard.ts b/src/api/types/Scorecard.ts new file mode 100644 index 00000000..a442d0a4 --- /dev/null +++ b/src/api/types/Scorecard.ts @@ -0,0 +1,28 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface Scorecard { + /** This is the unique identifier for the scorecard. */ + id: string; + /** This is the unique identifier for the org that this scorecard belongs to. */ + orgId: string; + /** This is the ISO 8601 date-time string of when the scorecard was created. */ + createdAt: string; + /** This is the ISO 8601 date-time string of when the scorecard was last updated. */ + updatedAt: string; + /** This is the name of the scorecard. It is only for user reference and will not be used for any evaluation. */ + name?: string; + /** This is the description of the scorecard. It is only for user reference and will not be used for any evaluation. */ + description?: string; + /** + * 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. + */ + metrics: Vapi.ScorecardMetric[]; + /** + * 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. + */ + assistantIds?: string[]; +} diff --git a/src/api/types/ScorecardMetric.ts b/src/api/types/ScorecardMetric.ts new file mode 100644 index 00000000..1a96c31f --- /dev/null +++ b/src/api/types/ScorecardMetric.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface ScorecardMetric { + /** + * This is the unique identifier for the structured output that will be used to evaluate the scorecard. + * The structured output must be of type number or boolean only for now. + */ + structuredOutputId: string; + /** + * 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. + */ + conditions: Record[]; +} diff --git a/src/api/types/ScorecardPaginatedResponse.ts b/src/api/types/ScorecardPaginatedResponse.ts new file mode 100644 index 00000000..dcf4b9be --- /dev/null +++ b/src/api/types/ScorecardPaginatedResponse.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface ScorecardPaginatedResponse { + results: Vapi.Scorecard[]; + metadata: Vapi.PaginationMeta; +} diff --git a/src/api/types/SecurityFilterBase.ts b/src/api/types/SecurityFilterBase.ts index a1fa50ec..eb2e46d0 100644 --- a/src/api/types/SecurityFilterBase.ts +++ b/src/api/types/SecurityFilterBase.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export interface SecurityFilterBase {} +export type SecurityFilterBase = {}; diff --git a/src/api/types/SecurityFilterPlan.ts b/src/api/types/SecurityFilterPlan.ts index 8408a0c2..10f8ab7c 100644 --- a/src/api/types/SecurityFilterPlan.ts +++ b/src/api/types/SecurityFilterPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SecurityFilterPlan { /** diff --git a/src/api/types/SecurityFilterPlanMode.ts b/src/api/types/SecurityFilterPlanMode.ts index 906317d0..c6b64ab4 100644 --- a/src/api/types/SecurityFilterPlanMode.ts +++ b/src/api/types/SecurityFilterPlanMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Mode of operation when a security threat is detected. @@ -9,9 +7,9 @@ * - 'replace': Replace threatening patterns with replacement text * @default 'sanitize' */ -export type SecurityFilterPlanMode = "sanitize" | "reject" | "replace"; export const SecurityFilterPlanMode = { Sanitize: "sanitize", Reject: "reject", Replace: "replace", } as const; +export type SecurityFilterPlanMode = (typeof SecurityFilterPlanMode)[keyof typeof SecurityFilterPlanMode]; diff --git a/src/api/types/Server.ts b/src/api/types/Server.ts index c028308f..ebb9966c 100644 --- a/src/api/types/Server.ts +++ b/src/api/types/Server.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Server { /** @@ -13,6 +11,12 @@ export interface Server { timeoutSeconds?: number; /** The credential ID for server authentication */ credentialId?: string; + /** + * If enabled, requests will originate from a static set of IPs owned and managed by Vapi. + * + * @default false + */ + staticIpAddressesEnabled?: boolean; /** This is where the request will be sent. */ url?: string; /** diff --git a/src/api/types/ServerMessage.ts b/src/api/types/ServerMessage.ts index fc04d7a3..be0ec84c 100644 --- a/src/api/types/ServerMessage.ts +++ b/src/api/types/ServerMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessage { /** diff --git a/src/api/types/ServerMessageAssistantRequest.ts b/src/api/types/ServerMessageAssistantRequest.ts index bb03eecc..25b8091a 100644 --- a/src/api/types/ServerMessageAssistantRequest.ts +++ b/src/api/types/ServerMessageAssistantRequest.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageAssistantRequest { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageAssistantRequestPhoneNumber; /** This is the type of the message. "assistant-request" is sent to fetch assistant configuration for an incoming call. */ - type: "assistant-request"; + type: Vapi.ServerMessageAssistantRequestType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageAssistantRequestPhoneNumber.ts b/src/api/types/ServerMessageAssistantRequestPhoneNumber.ts index 696de13b..4739a3d1 100644 --- a/src/api/types/ServerMessageAssistantRequestPhoneNumber.ts +++ b/src/api/types/ServerMessageAssistantRequestPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageAssistantRequestType.ts b/src/api/types/ServerMessageAssistantRequestType.ts new file mode 100644 index 00000000..64aabc82 --- /dev/null +++ b/src/api/types/ServerMessageAssistantRequestType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "assistant-request" is sent to fetch assistant configuration for an incoming call. */ +export const ServerMessageAssistantRequestType = { + AssistantRequest: "assistant-request", +} as const; +export type ServerMessageAssistantRequestType = + (typeof ServerMessageAssistantRequestType)[keyof typeof ServerMessageAssistantRequestType]; diff --git a/src/api/types/ServerMessageCallDeleteFailed.ts b/src/api/types/ServerMessageCallDeleteFailed.ts index a5a25865..4ecd5898 100644 --- a/src/api/types/ServerMessageCallDeleteFailed.ts +++ b/src/api/types/ServerMessageCallDeleteFailed.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageCallDeleteFailed { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageCallDeleteFailedPhoneNumber; /** This is the type of the message. "call.deleted" is sent when a call is deleted. */ - type: "call.delete.failed"; + type: Vapi.ServerMessageCallDeleteFailedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageCallDeleteFailedPhoneNumber.ts b/src/api/types/ServerMessageCallDeleteFailedPhoneNumber.ts index e395f4d8..81dc9158 100644 --- a/src/api/types/ServerMessageCallDeleteFailedPhoneNumber.ts +++ b/src/api/types/ServerMessageCallDeleteFailedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageCallDeleteFailedType.ts b/src/api/types/ServerMessageCallDeleteFailedType.ts new file mode 100644 index 00000000..d0679faa --- /dev/null +++ b/src/api/types/ServerMessageCallDeleteFailedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "call.deleted" is sent when a call is deleted. */ +export const ServerMessageCallDeleteFailedType = { + CallDeleteFailed: "call.delete.failed", +} as const; +export type ServerMessageCallDeleteFailedType = + (typeof ServerMessageCallDeleteFailedType)[keyof typeof ServerMessageCallDeleteFailedType]; diff --git a/src/api/types/ServerMessageCallDeleted.ts b/src/api/types/ServerMessageCallDeleted.ts index bf00b9dc..ec59f562 100644 --- a/src/api/types/ServerMessageCallDeleted.ts +++ b/src/api/types/ServerMessageCallDeleted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageCallDeleted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageCallDeletedPhoneNumber; /** This is the type of the message. "call.deleted" is sent when a call is deleted. */ - type: "call.deleted"; + type: Vapi.ServerMessageCallDeletedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageCallDeletedPhoneNumber.ts b/src/api/types/ServerMessageCallDeletedPhoneNumber.ts index fe1fe6d4..4a6b1d20 100644 --- a/src/api/types/ServerMessageCallDeletedPhoneNumber.ts +++ b/src/api/types/ServerMessageCallDeletedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageCallDeletedType.ts b/src/api/types/ServerMessageCallDeletedType.ts new file mode 100644 index 00000000..82b61874 --- /dev/null +++ b/src/api/types/ServerMessageCallDeletedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "call.deleted" is sent when a call is deleted. */ +export const ServerMessageCallDeletedType = { + CallDeleted: "call.deleted", +} as const; +export type ServerMessageCallDeletedType = + (typeof ServerMessageCallDeletedType)[keyof typeof ServerMessageCallDeletedType]; diff --git a/src/api/types/ServerMessageCallEndpointingRequest.ts b/src/api/types/ServerMessageCallEndpointingRequest.ts index 0db2242b..f97356b5 100644 --- a/src/api/types/ServerMessageCallEndpointingRequest.ts +++ b/src/api/types/ServerMessageCallEndpointingRequest.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageCallEndpointingRequest { /** This is the phone number that the message is associated with. */ @@ -35,7 +33,7 @@ export interface ServerMessageCallEndpointingRequest { * "timeoutSeconds": 0.5 * } */ - type: "call.endpointing.request"; + type: Vapi.ServerMessageCallEndpointingRequestType; /** This is the conversation history at the time of the endpointing request. */ messages?: Vapi.ServerMessageCallEndpointingRequestMessagesItem[]; /** This is just `messages` formatted for OpenAI. */ diff --git a/src/api/types/ServerMessageCallEndpointingRequestMessagesItem.ts b/src/api/types/ServerMessageCallEndpointingRequestMessagesItem.ts index 2d3a5479..864ddbff 100644 --- a/src/api/types/ServerMessageCallEndpointingRequestMessagesItem.ts +++ b/src/api/types/ServerMessageCallEndpointingRequestMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ServerMessageCallEndpointingRequestMessagesItem = | Vapi.UserMessage diff --git a/src/api/types/ServerMessageCallEndpointingRequestPhoneNumber.ts b/src/api/types/ServerMessageCallEndpointingRequestPhoneNumber.ts index abe62862..4f13b7f2 100644 --- a/src/api/types/ServerMessageCallEndpointingRequestPhoneNumber.ts +++ b/src/api/types/ServerMessageCallEndpointingRequestPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageCallEndpointingRequestType.ts b/src/api/types/ServerMessageCallEndpointingRequestType.ts new file mode 100644 index 00000000..c1cf20ed --- /dev/null +++ b/src/api/types/ServerMessageCallEndpointingRequestType.ts @@ -0,0 +1,35 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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 + * } + */ +export const ServerMessageCallEndpointingRequestType = { + CallEndpointingRequest: "call.endpointing.request", +} as const; +export type ServerMessageCallEndpointingRequestType = + (typeof ServerMessageCallEndpointingRequestType)[keyof typeof ServerMessageCallEndpointingRequestType]; diff --git a/src/api/types/ServerMessageChatCreated.ts b/src/api/types/ServerMessageChatCreated.ts index 69814c6d..ada7b98a 100644 --- a/src/api/types/ServerMessageChatCreated.ts +++ b/src/api/types/ServerMessageChatCreated.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageChatCreated { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageChatCreatedPhoneNumber; /** This is the type of the message. "chat.created" is sent when a new chat is created. */ - type: "chat.created"; + type: Vapi.ServerMessageChatCreatedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageChatCreatedPhoneNumber.ts b/src/api/types/ServerMessageChatCreatedPhoneNumber.ts index 357a4c36..faa029f4 100644 --- a/src/api/types/ServerMessageChatCreatedPhoneNumber.ts +++ b/src/api/types/ServerMessageChatCreatedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageChatCreatedType.ts b/src/api/types/ServerMessageChatCreatedType.ts new file mode 100644 index 00000000..a11685ed --- /dev/null +++ b/src/api/types/ServerMessageChatCreatedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "chat.created" is sent when a new chat is created. */ +export const ServerMessageChatCreatedType = { + ChatCreated: "chat.created", +} as const; +export type ServerMessageChatCreatedType = + (typeof ServerMessageChatCreatedType)[keyof typeof ServerMessageChatCreatedType]; diff --git a/src/api/types/ServerMessageChatDeleted.ts b/src/api/types/ServerMessageChatDeleted.ts index 015095c7..8553c31c 100644 --- a/src/api/types/ServerMessageChatDeleted.ts +++ b/src/api/types/ServerMessageChatDeleted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageChatDeleted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageChatDeletedPhoneNumber; /** This is the type of the message. "chat.deleted" is sent when a chat is deleted. */ - type: "chat.deleted"; + type: Vapi.ServerMessageChatDeletedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageChatDeletedPhoneNumber.ts b/src/api/types/ServerMessageChatDeletedPhoneNumber.ts index 77354c1a..baffb5c9 100644 --- a/src/api/types/ServerMessageChatDeletedPhoneNumber.ts +++ b/src/api/types/ServerMessageChatDeletedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageChatDeletedType.ts b/src/api/types/ServerMessageChatDeletedType.ts new file mode 100644 index 00000000..b6a7c3c5 --- /dev/null +++ b/src/api/types/ServerMessageChatDeletedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "chat.deleted" is sent when a chat is deleted. */ +export const ServerMessageChatDeletedType = { + ChatDeleted: "chat.deleted", +} as const; +export type ServerMessageChatDeletedType = + (typeof ServerMessageChatDeletedType)[keyof typeof ServerMessageChatDeletedType]; diff --git a/src/api/types/ServerMessageConversationUpdate.ts b/src/api/types/ServerMessageConversationUpdate.ts index e153c900..9b45de8e 100644 --- a/src/api/types/ServerMessageConversationUpdate.ts +++ b/src/api/types/ServerMessageConversationUpdate.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageConversationUpdate { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageConversationUpdatePhoneNumber; /** This is the type of the message. "conversation-update" is sent when an update is committed to the conversation history. */ - type: "conversation-update"; + type: Vapi.ServerMessageConversationUpdateType; /** This is the most up-to-date conversation history at the time the message is sent. */ messages?: Vapi.ServerMessageConversationUpdateMessagesItem[]; /** This is the most up-to-date conversation history at the time the message is sent, formatted for OpenAI. */ diff --git a/src/api/types/ServerMessageConversationUpdateMessagesItem.ts b/src/api/types/ServerMessageConversationUpdateMessagesItem.ts index bbbde94d..10136052 100644 --- a/src/api/types/ServerMessageConversationUpdateMessagesItem.ts +++ b/src/api/types/ServerMessageConversationUpdateMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ServerMessageConversationUpdateMessagesItem = | Vapi.UserMessage diff --git a/src/api/types/ServerMessageConversationUpdatePhoneNumber.ts b/src/api/types/ServerMessageConversationUpdatePhoneNumber.ts index 109c7196..2a35ca45 100644 --- a/src/api/types/ServerMessageConversationUpdatePhoneNumber.ts +++ b/src/api/types/ServerMessageConversationUpdatePhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageConversationUpdateType.ts b/src/api/types/ServerMessageConversationUpdateType.ts new file mode 100644 index 00000000..63cf5328 --- /dev/null +++ b/src/api/types/ServerMessageConversationUpdateType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "conversation-update" is sent when an update is committed to the conversation history. */ +export const ServerMessageConversationUpdateType = { + ConversationUpdate: "conversation-update", +} as const; +export type ServerMessageConversationUpdateType = + (typeof ServerMessageConversationUpdateType)[keyof typeof ServerMessageConversationUpdateType]; diff --git a/src/api/types/ServerMessageEndOfCallReport.ts b/src/api/types/ServerMessageEndOfCallReport.ts index fe7f9eb3..cad4f976 100644 --- a/src/api/types/ServerMessageEndOfCallReport.ts +++ b/src/api/types/ServerMessageEndOfCallReport.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageEndOfCallReport { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageEndOfCallReportPhoneNumber; /** This is the type of the message. "end-of-call-report" is sent when the call ends and post-processing is complete. */ - type: "end-of-call-report"; + type: Vapi.ServerMessageEndOfCallReportType; /** This is the reason the call ended. This can also be found at `call.endedReason` on GET /call/:id. */ endedReason: Vapi.ServerMessageEndOfCallReportEndedReason; /** This is the cost of the call in USD. This can also be found at `call.cost` on GET /call/:id. */ diff --git a/src/api/types/ServerMessageEndOfCallReportCostsItem.ts b/src/api/types/ServerMessageEndOfCallReportCostsItem.ts index a516136a..2769f58a 100644 --- a/src/api/types/ServerMessageEndOfCallReportCostsItem.ts +++ b/src/api/types/ServerMessageEndOfCallReportCostsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ServerMessageEndOfCallReportCostsItem = | Vapi.TransportCost diff --git a/src/api/types/ServerMessageEndOfCallReportEndedReason.ts b/src/api/types/ServerMessageEndOfCallReportEndedReason.ts index e8132171..fcd08314 100644 --- a/src/api/types/ServerMessageEndOfCallReportEndedReason.ts +++ b/src/api/types/ServerMessageEndOfCallReportEndedReason.ts @@ -1,538 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the reason the call ended. This can also be found at `call.endedReason` on GET /call/:id. - */ -export type ServerMessageEndOfCallReportEndedReason = - | "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" - | "pipeline-error-openai-voice-failed" - | "pipeline-error-cartesia-voice-failed" - | "pipeline-error-deepgram-voice-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-smallest-ai-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-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-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-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" - | "call.in-progress.error-pipeline-no-available-llm-model" - | "worker-shutdown" - | "vonage-disconnected" - | "vonage-failed-to-connect-call" - | "vonage-completed" - | "phone-call-provider-bypass-enabled-but-no-call-received" - | "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-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-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-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-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-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" - | "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" - | "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" - | "pipeline-error-eleven-labs-unauthorized-to-access-model" - | "pipeline-error-eleven-labs-professional-voices-only-for-creator-plus" - | "pipeline-error-eleven-labs-blocked-free-plan-and-requested-upgrade" - | "pipeline-error-eleven-labs-blocked-concurrent-requests-and-requested-upgrade" - | "pipeline-error-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade" - | "pipeline-error-eleven-labs-system-busy-and-requested-upgrade" - | "pipeline-error-eleven-labs-voice-not-fine-tuned" - | "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-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-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" - | "pipeline-error-playht-403-forbidden-api-access-not-available" - | "pipeline-error-playht-429-exceeded-quota" - | "pipeline-error-playht-502-gateway-error" - | "pipeline-error-playht-504-gateway-error" - | "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-eleven-labs-transcriber-failed" - | "call.in-progress.error-vapifault-eleven-labs-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" - | "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" - | "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" - | "call.in-progress.error-warm-transfer-hang-timeout" - | "call.in-progress.error-warm-transfer-idle-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-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-sip-inbound-call-failed-to-connect" - | "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-503-service-unavailable" - | "call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable" - | "call.in-progress.error-sip-outbound-call-failed-to-connect" - | "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" - | "call.ringing.error-sip-inbound-call-failed-to-connect" - | "twilio-failed-to-connect-call" - | "twilio-reported-customer-misdialed" - | "vonage-rejected" - | "voicemail" - | "call-deleted"; +/** This is the reason the call ended. This can also be found at `call.endedReason` on GET /call/:id. */ export const ServerMessageEndOfCallReportEndedReason = { CallStartErrorNeitherAssistantNorServerSet: "call-start-error-neither-assistant-nor-server-set", AssistantRequestFailed: "assistant-request-failed", @@ -571,6 +39,7 @@ export const ServerMessageEndOfCallReportEndedReason = { PipelineErrorAzureVoiceFailed: "pipeline-error-azure-voice-failed", PipelineErrorRimeAiVoiceFailed: "pipeline-error-rime-ai-voice-failed", PipelineErrorSmallestAiVoiceFailed: "pipeline-error-smallest-ai-voice-failed", + PipelineErrorVapiVoiceFailed: "pipeline-error-vapi-voice-failed", PipelineErrorNeuphonicVoiceFailed: "pipeline-error-neuphonic-voice-failed", PipelineErrorHumeVoiceFailed: "pipeline-error-hume-voice-failed", PipelineErrorSesameVoiceFailed: "pipeline-error-sesame-voice-failed", @@ -586,6 +55,7 @@ export const ServerMessageEndOfCallReportEndedReason = { CallInProgressErrorVapifaultAzureVoiceFailed: "call.in-progress.error-vapifault-azure-voice-failed", CallInProgressErrorVapifaultRimeAiVoiceFailed: "call.in-progress.error-vapifault-rime-ai-voice-failed", CallInProgressErrorVapifaultSmallestAiVoiceFailed: "call.in-progress.error-vapifault-smallest-ai-voice-failed", + CallInProgressErrorVapifaultVapiVoiceFailed: "call.in-progress.error-vapifault-vapi-voice-failed", CallInProgressErrorVapifaultNeuphonicVoiceFailed: "call.in-progress.error-vapifault-neuphonic-voice-failed", CallInProgressErrorVapifaultHumeVoiceFailed: "call.in-progress.error-vapifault-hume-voice-failed", CallInProgressErrorVapifaultSesameVoiceFailed: "call.in-progress.error-vapifault-sesame-voice-failed", @@ -1044,6 +514,7 @@ export const ServerMessageEndOfCallReportEndedReason = { "call.in-progress.error-providerfault-custom-llm-500-server-error", CallInProgressErrorProviderfaultCustomLlm503ServerOverloadedError: "call.in-progress.error-providerfault-custom-llm-503-server-overloaded-error", + CallInProgressErrorPipelineWsModelConnectionFailed: "call.in-progress.error-pipeline-ws-model-connection-failed", PipelineErrorCustomVoiceFailed: "pipeline-error-custom-voice-failed", PipelineErrorCartesiaSocketHangUp: "pipeline-error-cartesia-socket-hang-up", PipelineErrorCartesiaRequestedPayment: "pipeline-error-cartesia-requested-payment", @@ -1127,6 +598,8 @@ export const ServerMessageEndOfCallReportEndedReason = { "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", CallInProgressErrorVapifaultElevenLabsBlockedVoicePotentiallyAgainstTermsOfServiceAndAwaitingVerification: "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + CallInProgressErrorProviderfaultElevenLabsSystemBusyAndRequestedUpgrade: + "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", CallInProgressErrorProviderfaultElevenLabs500ServerError: "call.in-progress.error-providerfault-eleven-labs-500-server-error", CallInProgressErrorProviderfaultElevenLabs503ServerError: @@ -1199,8 +672,6 @@ export const ServerMessageEndOfCallReportEndedReason = { CallInProgressErrorWarmTransferAssistantCancelled: "call.in-progress.error-warm-transfer-assistant-cancelled", CallInProgressErrorWarmTransferSilenceTimeout: "call.in-progress.error-warm-transfer-silence-timeout", CallInProgressErrorWarmTransferMicrophoneTimeout: "call.in-progress.error-warm-transfer-microphone-timeout", - CallInProgressErrorWarmTransferHangTimeout: "call.in-progress.error-warm-transfer-hang-timeout", - CallInProgressErrorWarmTransferIdleTimeout: "call.in-progress.error-warm-transfer-idle-timeout", AssistantEndedCall: "assistant-ended-call", AssistantSaidEndCallPhrase: "assistant-said-end-call-phrase", AssistantEndedCallWithHangupTask: "assistant-ended-call-with-hangup-task", @@ -1243,3 +714,5 @@ export const ServerMessageEndOfCallReportEndedReason = { Voicemail: "voicemail", CallDeleted: "call-deleted", } as const; +export type ServerMessageEndOfCallReportEndedReason = + (typeof ServerMessageEndOfCallReportEndedReason)[keyof typeof ServerMessageEndOfCallReportEndedReason]; diff --git a/src/api/types/ServerMessageEndOfCallReportPhoneNumber.ts b/src/api/types/ServerMessageEndOfCallReportPhoneNumber.ts index 688295f3..436d37bf 100644 --- a/src/api/types/ServerMessageEndOfCallReportPhoneNumber.ts +++ b/src/api/types/ServerMessageEndOfCallReportPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageEndOfCallReportType.ts b/src/api/types/ServerMessageEndOfCallReportType.ts new file mode 100644 index 00000000..c38c2f89 --- /dev/null +++ b/src/api/types/ServerMessageEndOfCallReportType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "end-of-call-report" is sent when the call ends and post-processing is complete. */ +export const ServerMessageEndOfCallReportType = { + EndOfCallReport: "end-of-call-report", +} as const; +export type ServerMessageEndOfCallReportType = + (typeof ServerMessageEndOfCallReportType)[keyof typeof ServerMessageEndOfCallReportType]; diff --git a/src/api/types/ServerMessageHandoffDestinationRequest.ts b/src/api/types/ServerMessageHandoffDestinationRequest.ts index f36f0cde..257036b3 100644 --- a/src/api/types/ServerMessageHandoffDestinationRequest.ts +++ b/src/api/types/ServerMessageHandoffDestinationRequest.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageHandoffDestinationRequest { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageHandoffDestinationRequestPhoneNumber; /** This is the type of the message. "handoff-destination-request" is sent when the model is requesting handoff but destination is unknown. */ - type: "handoff-destination-request"; + type: Vapi.ServerMessageHandoffDestinationRequestType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageHandoffDestinationRequestPhoneNumber.ts b/src/api/types/ServerMessageHandoffDestinationRequestPhoneNumber.ts index 0275bc95..469dfe0b 100644 --- a/src/api/types/ServerMessageHandoffDestinationRequestPhoneNumber.ts +++ b/src/api/types/ServerMessageHandoffDestinationRequestPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageHandoffDestinationRequestType.ts b/src/api/types/ServerMessageHandoffDestinationRequestType.ts new file mode 100644 index 00000000..e9c668e3 --- /dev/null +++ b/src/api/types/ServerMessageHandoffDestinationRequestType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "handoff-destination-request" is sent when the model is requesting handoff but destination is unknown. */ +export const ServerMessageHandoffDestinationRequestType = { + HandoffDestinationRequest: "handoff-destination-request", +} as const; +export type ServerMessageHandoffDestinationRequestType = + (typeof ServerMessageHandoffDestinationRequestType)[keyof typeof ServerMessageHandoffDestinationRequestType]; diff --git a/src/api/types/ServerMessageHang.ts b/src/api/types/ServerMessageHang.ts index 2b24970d..d8883508 100644 --- a/src/api/types/ServerMessageHang.ts +++ b/src/api/types/ServerMessageHang.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageHang { /** This is the phone number that the message is associated with. */ @@ -14,7 +12,7 @@ export interface ServerMessageHang { * - the tool call is still waiting for a response from your server * - etc. */ - type: "hang"; + type: Vapi.ServerMessageHangType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageHangPhoneNumber.ts b/src/api/types/ServerMessageHangPhoneNumber.ts index eba50577..341607f6 100644 --- a/src/api/types/ServerMessageHangPhoneNumber.ts +++ b/src/api/types/ServerMessageHangPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageHangType.ts b/src/api/types/ServerMessageHangType.ts new file mode 100644 index 00000000..3c075f7f --- /dev/null +++ b/src/api/types/ServerMessageHangType.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + */ +export const ServerMessageHangType = { + Hang: "hang", +} as const; +export type ServerMessageHangType = (typeof ServerMessageHangType)[keyof typeof ServerMessageHangType]; diff --git a/src/api/types/ServerMessageKnowledgeBaseRequest.ts b/src/api/types/ServerMessageKnowledgeBaseRequest.ts index 54c0c9c2..fd806cc4 100644 --- a/src/api/types/ServerMessageKnowledgeBaseRequest.ts +++ b/src/api/types/ServerMessageKnowledgeBaseRequest.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageKnowledgeBaseRequest { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageKnowledgeBaseRequestPhoneNumber; /** 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`. */ - type: "knowledge-base-request"; + type: Vapi.ServerMessageKnowledgeBaseRequestType; /** These are the messages that are going to be sent to the `model` right after the `knowledge-base-request` webhook completes. */ messages?: Vapi.ServerMessageKnowledgeBaseRequestMessagesItem[]; /** This is just `messages` formatted for OpenAI. */ diff --git a/src/api/types/ServerMessageKnowledgeBaseRequestMessagesItem.ts b/src/api/types/ServerMessageKnowledgeBaseRequestMessagesItem.ts index a95e400d..2935c599 100644 --- a/src/api/types/ServerMessageKnowledgeBaseRequestMessagesItem.ts +++ b/src/api/types/ServerMessageKnowledgeBaseRequestMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ServerMessageKnowledgeBaseRequestMessagesItem = | Vapi.UserMessage diff --git a/src/api/types/ServerMessageKnowledgeBaseRequestPhoneNumber.ts b/src/api/types/ServerMessageKnowledgeBaseRequestPhoneNumber.ts index 9f95983c..f06c773d 100644 --- a/src/api/types/ServerMessageKnowledgeBaseRequestPhoneNumber.ts +++ b/src/api/types/ServerMessageKnowledgeBaseRequestPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageKnowledgeBaseRequestType.ts b/src/api/types/ServerMessageKnowledgeBaseRequestType.ts new file mode 100644 index 00000000..8dfd155e --- /dev/null +++ b/src/api/types/ServerMessageKnowledgeBaseRequestType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** 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`. */ +export const ServerMessageKnowledgeBaseRequestType = { + KnowledgeBaseRequest: "knowledge-base-request", +} as const; +export type ServerMessageKnowledgeBaseRequestType = + (typeof ServerMessageKnowledgeBaseRequestType)[keyof typeof ServerMessageKnowledgeBaseRequestType]; diff --git a/src/api/types/ServerMessageLanguageChangeDetected.ts b/src/api/types/ServerMessageLanguageChangeDetected.ts index 821c7cb6..b7c88f75 100644 --- a/src/api/types/ServerMessageLanguageChangeDetected.ts +++ b/src/api/types/ServerMessageLanguageChangeDetected.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageLanguageChangeDetected { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageLanguageChangeDetectedPhoneNumber; /** This is the type of the message. "language-change-detected" is sent when the transcriber is automatically switched based on the detected language. */ - type: "language-change-detected"; + type: Vapi.ServerMessageLanguageChangeDetectedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageLanguageChangeDetectedPhoneNumber.ts b/src/api/types/ServerMessageLanguageChangeDetectedPhoneNumber.ts index 884225c2..5a5ea193 100644 --- a/src/api/types/ServerMessageLanguageChangeDetectedPhoneNumber.ts +++ b/src/api/types/ServerMessageLanguageChangeDetectedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageLanguageChangeDetectedType.ts b/src/api/types/ServerMessageLanguageChangeDetectedType.ts new file mode 100644 index 00000000..183b106e --- /dev/null +++ b/src/api/types/ServerMessageLanguageChangeDetectedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "language-change-detected" is sent when the transcriber is automatically switched based on the detected language. */ +export const ServerMessageLanguageChangeDetectedType = { + LanguageChangeDetected: "language-change-detected", +} as const; +export type ServerMessageLanguageChangeDetectedType = + (typeof ServerMessageLanguageChangeDetectedType)[keyof typeof ServerMessageLanguageChangeDetectedType]; diff --git a/src/api/types/ServerMessageMessage.ts b/src/api/types/ServerMessageMessage.ts index 556035f9..7f5afbb4 100644 --- a/src/api/types/ServerMessageMessage.ts +++ b/src/api/types/ServerMessageMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * 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`. diff --git a/src/api/types/ServerMessageModelOutput.ts b/src/api/types/ServerMessageModelOutput.ts index a639192c..d9b3ba53 100644 --- a/src/api/types/ServerMessageModelOutput.ts +++ b/src/api/types/ServerMessageModelOutput.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageModelOutput { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageModelOutputPhoneNumber; /** This is the type of the message. "model-output" is sent as the model outputs tokens. */ - type: "model-output"; + type: Vapi.ServerMessageModelOutputType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageModelOutputPhoneNumber.ts b/src/api/types/ServerMessageModelOutputPhoneNumber.ts index d95f78ae..71de500d 100644 --- a/src/api/types/ServerMessageModelOutputPhoneNumber.ts +++ b/src/api/types/ServerMessageModelOutputPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageModelOutputType.ts b/src/api/types/ServerMessageModelOutputType.ts new file mode 100644 index 00000000..f966be48 --- /dev/null +++ b/src/api/types/ServerMessageModelOutputType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "model-output" is sent as the model outputs tokens. */ +export const ServerMessageModelOutputType = { + ModelOutput: "model-output", +} as const; +export type ServerMessageModelOutputType = + (typeof ServerMessageModelOutputType)[keyof typeof ServerMessageModelOutputType]; diff --git a/src/api/types/ServerMessagePhoneCallControl.ts b/src/api/types/ServerMessagePhoneCallControl.ts index 39d311db..3f23838d 100644 --- a/src/api/types/ServerMessagePhoneCallControl.ts +++ b/src/api/types/ServerMessagePhoneCallControl.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessagePhoneCallControl { /** This is the phone number that the message is associated with. */ @@ -12,7 +10,7 @@ export interface ServerMessagePhoneCallControl { * * When it is requested in `assistant.serverMessages`, the hangup and forwarding responsibilities are delegated to your server. Vapi will no longer do the actual transfer and hangup. */ - type: "phone-call-control"; + type: Vapi.ServerMessagePhoneCallControlType; /** This is the request to control the phone call. */ request: Vapi.ServerMessagePhoneCallControlRequest; /** This is the destination to forward the call to if the request is "forward". */ diff --git a/src/api/types/ServerMessagePhoneCallControlDestination.ts b/src/api/types/ServerMessagePhoneCallControlDestination.ts index 2832aad3..3f57aa20 100644 --- a/src/api/types/ServerMessagePhoneCallControlDestination.ts +++ b/src/api/types/ServerMessagePhoneCallControlDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination to forward the call to if the request is "forward". diff --git a/src/api/types/ServerMessagePhoneCallControlPhoneNumber.ts b/src/api/types/ServerMessagePhoneCallControlPhoneNumber.ts index 2591e0e7..63cbd66a 100644 --- a/src/api/types/ServerMessagePhoneCallControlPhoneNumber.ts +++ b/src/api/types/ServerMessagePhoneCallControlPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessagePhoneCallControlRequest.ts b/src/api/types/ServerMessagePhoneCallControlRequest.ts index 8f661c7b..a5ca59db 100644 --- a/src/api/types/ServerMessagePhoneCallControlRequest.ts +++ b/src/api/types/ServerMessagePhoneCallControlRequest.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the request to control the phone call. - */ -export type ServerMessagePhoneCallControlRequest = "forward" | "hang-up"; +/** This is the request to control the phone call. */ export const ServerMessagePhoneCallControlRequest = { Forward: "forward", HangUp: "hang-up", } as const; +export type ServerMessagePhoneCallControlRequest = + (typeof ServerMessagePhoneCallControlRequest)[keyof typeof ServerMessagePhoneCallControlRequest]; diff --git a/src/api/types/ServerMessagePhoneCallControlType.ts b/src/api/types/ServerMessagePhoneCallControlType.ts new file mode 100644 index 00000000..ca203ea3 --- /dev/null +++ b/src/api/types/ServerMessagePhoneCallControlType.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the message. "phone-call-control" is an advanced type of message. + * + * When it is requested in `assistant.serverMessages`, the hangup and forwarding responsibilities are delegated to your server. Vapi will no longer do the actual transfer and hangup. + */ +export const ServerMessagePhoneCallControlType = { + PhoneCallControl: "phone-call-control", +} as const; +export type ServerMessagePhoneCallControlType = + (typeof ServerMessagePhoneCallControlType)[keyof typeof ServerMessagePhoneCallControlType]; diff --git a/src/api/types/ServerMessageResponse.ts b/src/api/types/ServerMessageResponse.ts index 456aa1ef..b7bc7d2a 100644 --- a/src/api/types/ServerMessageResponse.ts +++ b/src/api/types/ServerMessageResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageResponse { /** diff --git a/src/api/types/ServerMessageResponseAssistantRequest.ts b/src/api/types/ServerMessageResponseAssistantRequest.ts index 3c56299b..02ed96ba 100644 --- a/src/api/types/ServerMessageResponseAssistantRequest.ts +++ b/src/api/types/ServerMessageResponseAssistantRequest.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageResponseAssistantRequest { /** @@ -49,6 +47,11 @@ export interface ServerMessageResponseAssistantRequest { * - Workflow, use `workflow` or `workflowId` */ squad?: Vapi.CreateSquadDto; + /** + * These are the overrides for the `squad` or `squadId`'s member settings and template variables. + * This will apply to all members of the squad. + */ + squadOverrides?: Vapi.AssistantOverrides; /** * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. * diff --git a/src/api/types/ServerMessageResponseAssistantRequestDestination.ts b/src/api/types/ServerMessageResponseAssistantRequestDestination.ts index 11f8009b..01722398 100644 --- a/src/api/types/ServerMessageResponseAssistantRequestDestination.ts +++ b/src/api/types/ServerMessageResponseAssistantRequestDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination to transfer the inbound call to. This will immediately transfer without using any assistants. diff --git a/src/api/types/ServerMessageResponseCallEndpointingRequest.ts b/src/api/types/ServerMessageResponseCallEndpointingRequest.ts index d72df0d1..ffdc5e3b 100644 --- a/src/api/types/ServerMessageResponseCallEndpointingRequest.ts +++ b/src/api/types/ServerMessageResponseCallEndpointingRequest.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ServerMessageResponseCallEndpointingRequest { /** This is the timeout in seconds to wait before considering the user's speech as finished. */ diff --git a/src/api/types/ServerMessageResponseHandoffDestinationRequest.ts b/src/api/types/ServerMessageResponseHandoffDestinationRequest.ts index 2e29db21..012814b7 100644 --- a/src/api/types/ServerMessageResponseHandoffDestinationRequest.ts +++ b/src/api/types/ServerMessageResponseHandoffDestinationRequest.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageResponseHandoffDestinationRequest { /** This is the destination you'd like the call to be transferred to. */ diff --git a/src/api/types/ServerMessageResponseKnowledgeBaseRequest.ts b/src/api/types/ServerMessageResponseKnowledgeBaseRequest.ts index d4435a3f..0c32ac3b 100644 --- a/src/api/types/ServerMessageResponseKnowledgeBaseRequest.ts +++ b/src/api/types/ServerMessageResponseKnowledgeBaseRequest.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageResponseKnowledgeBaseRequest { /** This is the list of documents that will be sent to the model alongside the `messages` to generate a response. */ diff --git a/src/api/types/ServerMessageResponseMessageResponse.ts b/src/api/types/ServerMessageResponseMessageResponse.ts index b3189e75..26b47bba 100644 --- a/src/api/types/ServerMessageResponseMessageResponse.ts +++ b/src/api/types/ServerMessageResponseMessageResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the response that is expected from the server to the message. diff --git a/src/api/types/ServerMessageResponseToolCalls.ts b/src/api/types/ServerMessageResponseToolCalls.ts index 2c2fb303..c79f9329 100644 --- a/src/api/types/ServerMessageResponseToolCalls.ts +++ b/src/api/types/ServerMessageResponseToolCalls.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageResponseToolCalls { /** These are the results of the "tool-calls" message. */ diff --git a/src/api/types/ServerMessageResponseTransferDestinationRequest.ts b/src/api/types/ServerMessageResponseTransferDestinationRequest.ts index 323e4560..4fda635a 100644 --- a/src/api/types/ServerMessageResponseTransferDestinationRequest.ts +++ b/src/api/types/ServerMessageResponseTransferDestinationRequest.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageResponseTransferDestinationRequest { /** This is the destination you'd like the call to be transferred to. */ diff --git a/src/api/types/ServerMessageResponseTransferDestinationRequestDestination.ts b/src/api/types/ServerMessageResponseTransferDestinationRequestDestination.ts index e0e6bba9..b9c8550c 100644 --- a/src/api/types/ServerMessageResponseTransferDestinationRequestDestination.ts +++ b/src/api/types/ServerMessageResponseTransferDestinationRequestDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination you'd like the call to be transferred to. diff --git a/src/api/types/ServerMessageResponseTransferDestinationRequestMessage.ts b/src/api/types/ServerMessageResponseTransferDestinationRequestMessage.ts index 986268a2..0cbeb98e 100644 --- a/src/api/types/ServerMessageResponseTransferDestinationRequestMessage.ts +++ b/src/api/types/ServerMessageResponseTransferDestinationRequestMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the message that will be spoken to the user as the tool is running. diff --git a/src/api/types/ServerMessageResponseVoiceRequest.ts b/src/api/types/ServerMessageResponseVoiceRequest.ts index 41782ef2..9c926bc5 100644 --- a/src/api/types/ServerMessageResponseVoiceRequest.ts +++ b/src/api/types/ServerMessageResponseVoiceRequest.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ServerMessageResponseVoiceRequest { /** diff --git a/src/api/types/ServerMessageSessionCreated.ts b/src/api/types/ServerMessageSessionCreated.ts index f1d811d2..87f26965 100644 --- a/src/api/types/ServerMessageSessionCreated.ts +++ b/src/api/types/ServerMessageSessionCreated.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageSessionCreated { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageSessionCreatedPhoneNumber; /** This is the type of the message. "session.created" is sent when a new session is created. */ - type: "session.created"; + type: Vapi.ServerMessageSessionCreatedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageSessionCreatedPhoneNumber.ts b/src/api/types/ServerMessageSessionCreatedPhoneNumber.ts index 5f311e9e..dc79783c 100644 --- a/src/api/types/ServerMessageSessionCreatedPhoneNumber.ts +++ b/src/api/types/ServerMessageSessionCreatedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageSessionCreatedType.ts b/src/api/types/ServerMessageSessionCreatedType.ts new file mode 100644 index 00000000..3f37387e --- /dev/null +++ b/src/api/types/ServerMessageSessionCreatedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "session.created" is sent when a new session is created. */ +export const ServerMessageSessionCreatedType = { + SessionCreated: "session.created", +} as const; +export type ServerMessageSessionCreatedType = + (typeof ServerMessageSessionCreatedType)[keyof typeof ServerMessageSessionCreatedType]; diff --git a/src/api/types/ServerMessageSessionDeleted.ts b/src/api/types/ServerMessageSessionDeleted.ts index 3d90cb73..aa017849 100644 --- a/src/api/types/ServerMessageSessionDeleted.ts +++ b/src/api/types/ServerMessageSessionDeleted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageSessionDeleted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageSessionDeletedPhoneNumber; /** This is the type of the message. "session.deleted" is sent when a session is deleted. */ - type: "session.deleted"; + type: Vapi.ServerMessageSessionDeletedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageSessionDeletedPhoneNumber.ts b/src/api/types/ServerMessageSessionDeletedPhoneNumber.ts index 26c6da73..f71955eb 100644 --- a/src/api/types/ServerMessageSessionDeletedPhoneNumber.ts +++ b/src/api/types/ServerMessageSessionDeletedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageSessionDeletedType.ts b/src/api/types/ServerMessageSessionDeletedType.ts new file mode 100644 index 00000000..282e5477 --- /dev/null +++ b/src/api/types/ServerMessageSessionDeletedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "session.deleted" is sent when a session is deleted. */ +export const ServerMessageSessionDeletedType = { + SessionDeleted: "session.deleted", +} as const; +export type ServerMessageSessionDeletedType = + (typeof ServerMessageSessionDeletedType)[keyof typeof ServerMessageSessionDeletedType]; diff --git a/src/api/types/ServerMessageSessionUpdated.ts b/src/api/types/ServerMessageSessionUpdated.ts index 3b45eb4a..72f7a637 100644 --- a/src/api/types/ServerMessageSessionUpdated.ts +++ b/src/api/types/ServerMessageSessionUpdated.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageSessionUpdated { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageSessionUpdatedPhoneNumber; /** This is the type of the message. "session.updated" is sent when a session is updated. */ - type: "session.updated"; + type: Vapi.ServerMessageSessionUpdatedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageSessionUpdatedPhoneNumber.ts b/src/api/types/ServerMessageSessionUpdatedPhoneNumber.ts index 5ae786be..d157d7c3 100644 --- a/src/api/types/ServerMessageSessionUpdatedPhoneNumber.ts +++ b/src/api/types/ServerMessageSessionUpdatedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageSessionUpdatedType.ts b/src/api/types/ServerMessageSessionUpdatedType.ts new file mode 100644 index 00000000..e6ac48e9 --- /dev/null +++ b/src/api/types/ServerMessageSessionUpdatedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "session.updated" is sent when a session is updated. */ +export const ServerMessageSessionUpdatedType = { + SessionUpdated: "session.updated", +} as const; +export type ServerMessageSessionUpdatedType = + (typeof ServerMessageSessionUpdatedType)[keyof typeof ServerMessageSessionUpdatedType]; diff --git a/src/api/types/ServerMessageSpeechUpdate.ts b/src/api/types/ServerMessageSpeechUpdate.ts index 8a5733d3..32ad3734 100644 --- a/src/api/types/ServerMessageSpeechUpdate.ts +++ b/src/api/types/ServerMessageSpeechUpdate.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageSpeechUpdate { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageSpeechUpdatePhoneNumber; /** This is the type of the message. "speech-update" is sent whenever assistant or user start or stop speaking. */ - type: "speech-update"; + type: Vapi.ServerMessageSpeechUpdateType; /** This is the status of the speech update. */ status: Vapi.ServerMessageSpeechUpdateStatus; /** This is the role which the speech update is for. */ diff --git a/src/api/types/ServerMessageSpeechUpdatePhoneNumber.ts b/src/api/types/ServerMessageSpeechUpdatePhoneNumber.ts index 8b8da501..e5204653 100644 --- a/src/api/types/ServerMessageSpeechUpdatePhoneNumber.ts +++ b/src/api/types/ServerMessageSpeechUpdatePhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageSpeechUpdateRole.ts b/src/api/types/ServerMessageSpeechUpdateRole.ts index 9b239d08..84661302 100644 --- a/src/api/types/ServerMessageSpeechUpdateRole.ts +++ b/src/api/types/ServerMessageSpeechUpdateRole.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the role which the speech update is for. - */ -export type ServerMessageSpeechUpdateRole = "assistant" | "user"; +/** This is the role which the speech update is for. */ export const ServerMessageSpeechUpdateRole = { Assistant: "assistant", User: "user", } as const; +export type ServerMessageSpeechUpdateRole = + (typeof ServerMessageSpeechUpdateRole)[keyof typeof ServerMessageSpeechUpdateRole]; diff --git a/src/api/types/ServerMessageSpeechUpdateStatus.ts b/src/api/types/ServerMessageSpeechUpdateStatus.ts index 4c0f3b17..3579b313 100644 --- a/src/api/types/ServerMessageSpeechUpdateStatus.ts +++ b/src/api/types/ServerMessageSpeechUpdateStatus.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the speech update. - */ -export type ServerMessageSpeechUpdateStatus = "started" | "stopped"; +/** This is the status of the speech update. */ export const ServerMessageSpeechUpdateStatus = { Started: "started", Stopped: "stopped", } as const; +export type ServerMessageSpeechUpdateStatus = + (typeof ServerMessageSpeechUpdateStatus)[keyof typeof ServerMessageSpeechUpdateStatus]; diff --git a/src/api/types/ServerMessageSpeechUpdateType.ts b/src/api/types/ServerMessageSpeechUpdateType.ts new file mode 100644 index 00000000..3cd89421 --- /dev/null +++ b/src/api/types/ServerMessageSpeechUpdateType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "speech-update" is sent whenever assistant or user start or stop speaking. */ +export const ServerMessageSpeechUpdateType = { + SpeechUpdate: "speech-update", +} as const; +export type ServerMessageSpeechUpdateType = + (typeof ServerMessageSpeechUpdateType)[keyof typeof ServerMessageSpeechUpdateType]; diff --git a/src/api/types/ServerMessageStatusUpdate.ts b/src/api/types/ServerMessageStatusUpdate.ts index ea8f0c70..d04e9ab4 100644 --- a/src/api/types/ServerMessageStatusUpdate.ts +++ b/src/api/types/ServerMessageStatusUpdate.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageStatusUpdate { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageStatusUpdatePhoneNumber; /** This is the type of the message. "status-update" is sent whenever the `call.status` changes. */ - type: "status-update"; + type: Vapi.ServerMessageStatusUpdateType; /** This is the status of the call. */ status: Vapi.ServerMessageStatusUpdateStatus; /** This is the reason the call ended. This is only sent if the status is "ended". */ diff --git a/src/api/types/ServerMessageStatusUpdateDestination.ts b/src/api/types/ServerMessageStatusUpdateDestination.ts index b64040c3..729d4ae4 100644 --- a/src/api/types/ServerMessageStatusUpdateDestination.ts +++ b/src/api/types/ServerMessageStatusUpdateDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination the call is being transferred to. This is only sent if the status is "forwarding". diff --git a/src/api/types/ServerMessageStatusUpdateEndedReason.ts b/src/api/types/ServerMessageStatusUpdateEndedReason.ts index 963b240a..7413a69e 100644 --- a/src/api/types/ServerMessageStatusUpdateEndedReason.ts +++ b/src/api/types/ServerMessageStatusUpdateEndedReason.ts @@ -1,538 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the reason the call ended. This is only sent if the status is "ended". - */ -export type ServerMessageStatusUpdateEndedReason = - | "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" - | "pipeline-error-openai-voice-failed" - | "pipeline-error-cartesia-voice-failed" - | "pipeline-error-deepgram-voice-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-smallest-ai-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-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-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-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" - | "call.in-progress.error-pipeline-no-available-llm-model" - | "worker-shutdown" - | "vonage-disconnected" - | "vonage-failed-to-connect-call" - | "vonage-completed" - | "phone-call-provider-bypass-enabled-but-no-call-received" - | "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-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-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-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-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-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" - | "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" - | "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" - | "pipeline-error-eleven-labs-unauthorized-to-access-model" - | "pipeline-error-eleven-labs-professional-voices-only-for-creator-plus" - | "pipeline-error-eleven-labs-blocked-free-plan-and-requested-upgrade" - | "pipeline-error-eleven-labs-blocked-concurrent-requests-and-requested-upgrade" - | "pipeline-error-eleven-labs-blocked-using-instant-voice-clone-and-requested-upgrade" - | "pipeline-error-eleven-labs-system-busy-and-requested-upgrade" - | "pipeline-error-eleven-labs-voice-not-fine-tuned" - | "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-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-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" - | "pipeline-error-playht-403-forbidden-api-access-not-available" - | "pipeline-error-playht-429-exceeded-quota" - | "pipeline-error-playht-502-gateway-error" - | "pipeline-error-playht-504-gateway-error" - | "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-eleven-labs-transcriber-failed" - | "call.in-progress.error-vapifault-eleven-labs-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" - | "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" - | "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" - | "call.in-progress.error-warm-transfer-hang-timeout" - | "call.in-progress.error-warm-transfer-idle-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-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-sip-inbound-call-failed-to-connect" - | "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-503-service-unavailable" - | "call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable" - | "call.in-progress.error-sip-outbound-call-failed-to-connect" - | "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" - | "call.ringing.error-sip-inbound-call-failed-to-connect" - | "twilio-failed-to-connect-call" - | "twilio-reported-customer-misdialed" - | "vonage-rejected" - | "voicemail" - | "call-deleted"; +/** This is the reason the call ended. This is only sent if the status is "ended". */ export const ServerMessageStatusUpdateEndedReason = { CallStartErrorNeitherAssistantNorServerSet: "call-start-error-neither-assistant-nor-server-set", AssistantRequestFailed: "assistant-request-failed", @@ -571,6 +39,7 @@ export const ServerMessageStatusUpdateEndedReason = { PipelineErrorAzureVoiceFailed: "pipeline-error-azure-voice-failed", PipelineErrorRimeAiVoiceFailed: "pipeline-error-rime-ai-voice-failed", PipelineErrorSmallestAiVoiceFailed: "pipeline-error-smallest-ai-voice-failed", + PipelineErrorVapiVoiceFailed: "pipeline-error-vapi-voice-failed", PipelineErrorNeuphonicVoiceFailed: "pipeline-error-neuphonic-voice-failed", PipelineErrorHumeVoiceFailed: "pipeline-error-hume-voice-failed", PipelineErrorSesameVoiceFailed: "pipeline-error-sesame-voice-failed", @@ -586,6 +55,7 @@ export const ServerMessageStatusUpdateEndedReason = { CallInProgressErrorVapifaultAzureVoiceFailed: "call.in-progress.error-vapifault-azure-voice-failed", CallInProgressErrorVapifaultRimeAiVoiceFailed: "call.in-progress.error-vapifault-rime-ai-voice-failed", CallInProgressErrorVapifaultSmallestAiVoiceFailed: "call.in-progress.error-vapifault-smallest-ai-voice-failed", + CallInProgressErrorVapifaultVapiVoiceFailed: "call.in-progress.error-vapifault-vapi-voice-failed", CallInProgressErrorVapifaultNeuphonicVoiceFailed: "call.in-progress.error-vapifault-neuphonic-voice-failed", CallInProgressErrorVapifaultHumeVoiceFailed: "call.in-progress.error-vapifault-hume-voice-failed", CallInProgressErrorVapifaultSesameVoiceFailed: "call.in-progress.error-vapifault-sesame-voice-failed", @@ -1044,6 +514,7 @@ export const ServerMessageStatusUpdateEndedReason = { "call.in-progress.error-providerfault-custom-llm-500-server-error", CallInProgressErrorProviderfaultCustomLlm503ServerOverloadedError: "call.in-progress.error-providerfault-custom-llm-503-server-overloaded-error", + CallInProgressErrorPipelineWsModelConnectionFailed: "call.in-progress.error-pipeline-ws-model-connection-failed", PipelineErrorCustomVoiceFailed: "pipeline-error-custom-voice-failed", PipelineErrorCartesiaSocketHangUp: "pipeline-error-cartesia-socket-hang-up", PipelineErrorCartesiaRequestedPayment: "pipeline-error-cartesia-requested-payment", @@ -1127,6 +598,8 @@ export const ServerMessageStatusUpdateEndedReason = { "call.in-progress.error-vapifault-eleven-labs-max-character-limit-exceeded", CallInProgressErrorVapifaultElevenLabsBlockedVoicePotentiallyAgainstTermsOfServiceAndAwaitingVerification: "call.in-progress.error-vapifault-eleven-labs-blocked-voice-potentially-against-terms-of-service-and-awaiting-verification", + CallInProgressErrorProviderfaultElevenLabsSystemBusyAndRequestedUpgrade: + "call.in-progress.error-providerfault-eleven-labs-system-busy-and-requested-upgrade", CallInProgressErrorProviderfaultElevenLabs500ServerError: "call.in-progress.error-providerfault-eleven-labs-500-server-error", CallInProgressErrorProviderfaultElevenLabs503ServerError: @@ -1199,8 +672,6 @@ export const ServerMessageStatusUpdateEndedReason = { CallInProgressErrorWarmTransferAssistantCancelled: "call.in-progress.error-warm-transfer-assistant-cancelled", CallInProgressErrorWarmTransferSilenceTimeout: "call.in-progress.error-warm-transfer-silence-timeout", CallInProgressErrorWarmTransferMicrophoneTimeout: "call.in-progress.error-warm-transfer-microphone-timeout", - CallInProgressErrorWarmTransferHangTimeout: "call.in-progress.error-warm-transfer-hang-timeout", - CallInProgressErrorWarmTransferIdleTimeout: "call.in-progress.error-warm-transfer-idle-timeout", AssistantEndedCall: "assistant-ended-call", AssistantSaidEndCallPhrase: "assistant-said-end-call-phrase", AssistantEndedCallWithHangupTask: "assistant-ended-call-with-hangup-task", @@ -1243,3 +714,5 @@ export const ServerMessageStatusUpdateEndedReason = { Voicemail: "voicemail", CallDeleted: "call-deleted", } as const; +export type ServerMessageStatusUpdateEndedReason = + (typeof ServerMessageStatusUpdateEndedReason)[keyof typeof ServerMessageStatusUpdateEndedReason]; diff --git a/src/api/types/ServerMessageStatusUpdateMessagesItem.ts b/src/api/types/ServerMessageStatusUpdateMessagesItem.ts index 27d3aef9..c10fa3db 100644 --- a/src/api/types/ServerMessageStatusUpdateMessagesItem.ts +++ b/src/api/types/ServerMessageStatusUpdateMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ServerMessageStatusUpdateMessagesItem = | Vapi.UserMessage diff --git a/src/api/types/ServerMessageStatusUpdatePhoneNumber.ts b/src/api/types/ServerMessageStatusUpdatePhoneNumber.ts index a8741159..5712b513 100644 --- a/src/api/types/ServerMessageStatusUpdatePhoneNumber.ts +++ b/src/api/types/ServerMessageStatusUpdatePhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageStatusUpdateStatus.ts b/src/api/types/ServerMessageStatusUpdateStatus.ts index fb2dc497..f2d903c7 100644 --- a/src/api/types/ServerMessageStatusUpdateStatus.ts +++ b/src/api/types/ServerMessageStatusUpdateStatus.ts @@ -1,19 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the call. - */ -export type ServerMessageStatusUpdateStatus = - | "scheduled" - | "queued" - | "ringing" - | "in-progress" - | "forwarding" - | "ended" - | "not-found" - | "deletion-failed"; +/** This is the status of the call. */ export const ServerMessageStatusUpdateStatus = { Scheduled: "scheduled", Queued: "queued", @@ -24,3 +11,5 @@ export const ServerMessageStatusUpdateStatus = { NotFound: "not-found", DeletionFailed: "deletion-failed", } as const; +export type ServerMessageStatusUpdateStatus = + (typeof ServerMessageStatusUpdateStatus)[keyof typeof ServerMessageStatusUpdateStatus]; diff --git a/src/api/types/ServerMessageStatusUpdateType.ts b/src/api/types/ServerMessageStatusUpdateType.ts new file mode 100644 index 00000000..95e2841b --- /dev/null +++ b/src/api/types/ServerMessageStatusUpdateType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "status-update" is sent whenever the `call.status` changes. */ +export const ServerMessageStatusUpdateType = { + StatusUpdate: "status-update", +} as const; +export type ServerMessageStatusUpdateType = + (typeof ServerMessageStatusUpdateType)[keyof typeof ServerMessageStatusUpdateType]; diff --git a/src/api/types/ServerMessageToolCalls.ts b/src/api/types/ServerMessageToolCalls.ts index 0c56c962..abe0ae7e 100644 --- a/src/api/types/ServerMessageToolCalls.ts +++ b/src/api/types/ServerMessageToolCalls.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageToolCalls { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageToolCallsPhoneNumber; /** This is the type of the message. "tool-calls" is sent to call a tool. */ - type?: "tool-calls"; + type?: Vapi.ServerMessageToolCallsType; /** This is the list of tools calls that the model is requesting along with the original tool configuration. */ toolWithToolCallList: Vapi.ServerMessageToolCallsToolWithToolCallListItem[]; /** This is the timestamp of the message. */ diff --git a/src/api/types/ServerMessageToolCallsPhoneNumber.ts b/src/api/types/ServerMessageToolCallsPhoneNumber.ts index 3d12fc91..6e0d0068 100644 --- a/src/api/types/ServerMessageToolCallsPhoneNumber.ts +++ b/src/api/types/ServerMessageToolCallsPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageToolCallsToolWithToolCallListItem.ts b/src/api/types/ServerMessageToolCallsToolWithToolCallListItem.ts index 5219f343..d7989c3d 100644 --- a/src/api/types/ServerMessageToolCallsToolWithToolCallListItem.ts +++ b/src/api/types/ServerMessageToolCallsToolWithToolCallListItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ServerMessageToolCallsToolWithToolCallListItem = | Vapi.FunctionToolWithToolCall diff --git a/src/api/types/ServerMessageToolCallsType.ts b/src/api/types/ServerMessageToolCallsType.ts new file mode 100644 index 00000000..d5625dbb --- /dev/null +++ b/src/api/types/ServerMessageToolCallsType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "tool-calls" is sent to call a tool. */ +export const ServerMessageToolCallsType = { + ToolCalls: "tool-calls", +} as const; +export type ServerMessageToolCallsType = (typeof ServerMessageToolCallsType)[keyof typeof ServerMessageToolCallsType]; diff --git a/src/api/types/ServerMessageTranscript.ts b/src/api/types/ServerMessageTranscript.ts index 98b56c8b..2a4b5352 100644 --- a/src/api/types/ServerMessageTranscript.ts +++ b/src/api/types/ServerMessageTranscript.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageTranscript { /** This is the phone number that the message is associated with. */ diff --git a/src/api/types/ServerMessageTranscriptPhoneNumber.ts b/src/api/types/ServerMessageTranscriptPhoneNumber.ts index ff9ef49f..542f8580 100644 --- a/src/api/types/ServerMessageTranscriptPhoneNumber.ts +++ b/src/api/types/ServerMessageTranscriptPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageTranscriptRole.ts b/src/api/types/ServerMessageTranscriptRole.ts index d1400056..fbbf016d 100644 --- a/src/api/types/ServerMessageTranscriptRole.ts +++ b/src/api/types/ServerMessageTranscriptRole.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the role for which the transcript is for. - */ -export type ServerMessageTranscriptRole = "assistant" | "user"; +/** This is the role for which the transcript is for. */ export const ServerMessageTranscriptRole = { Assistant: "assistant", User: "user", } as const; +export type ServerMessageTranscriptRole = + (typeof ServerMessageTranscriptRole)[keyof typeof ServerMessageTranscriptRole]; diff --git a/src/api/types/ServerMessageTranscriptTranscriptType.ts b/src/api/types/ServerMessageTranscriptTranscriptType.ts index 832a0365..50e2c4ca 100644 --- a/src/api/types/ServerMessageTranscriptTranscriptType.ts +++ b/src/api/types/ServerMessageTranscriptTranscriptType.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the type of the transcript. - */ -export type ServerMessageTranscriptTranscriptType = "partial" | "final"; +/** This is the type of the transcript. */ export const ServerMessageTranscriptTranscriptType = { Partial: "partial", Final: "final", } as const; +export type ServerMessageTranscriptTranscriptType = + (typeof ServerMessageTranscriptTranscriptType)[keyof typeof ServerMessageTranscriptTranscriptType]; diff --git a/src/api/types/ServerMessageTranscriptType.ts b/src/api/types/ServerMessageTranscriptType.ts index 7456c39a..2242df1f 100644 --- a/src/api/types/ServerMessageTranscriptType.ts +++ b/src/api/types/ServerMessageTranscriptType.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the type of the message. "transcript" is sent as transcriber outputs partial or final transcript. - */ -export type ServerMessageTranscriptType = "transcript" | 'transcript[transcriptType="final"]'; +/** This is the type of the message. "transcript" is sent as transcriber outputs partial or final transcript. */ export const ServerMessageTranscriptType = { Transcript: "transcript", TranscriptTranscriptTypeFinal: 'transcript[transcriptType="final"]', } as const; +export type ServerMessageTranscriptType = + (typeof ServerMessageTranscriptType)[keyof typeof ServerMessageTranscriptType]; diff --git a/src/api/types/ServerMessageTransferDestinationRequest.ts b/src/api/types/ServerMessageTransferDestinationRequest.ts index c0f48538..eb88506e 100644 --- a/src/api/types/ServerMessageTransferDestinationRequest.ts +++ b/src/api/types/ServerMessageTransferDestinationRequest.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageTransferDestinationRequest { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageTransferDestinationRequestPhoneNumber; /** This is the type of the message. "transfer-destination-request" is sent when the model is requesting transfer but destination is unknown. */ - type: "transfer-destination-request"; + type: Vapi.ServerMessageTransferDestinationRequestType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageTransferDestinationRequestPhoneNumber.ts b/src/api/types/ServerMessageTransferDestinationRequestPhoneNumber.ts index 29670ec3..b5d3b177 100644 --- a/src/api/types/ServerMessageTransferDestinationRequestPhoneNumber.ts +++ b/src/api/types/ServerMessageTransferDestinationRequestPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageTransferDestinationRequestType.ts b/src/api/types/ServerMessageTransferDestinationRequestType.ts new file mode 100644 index 00000000..b0a1e1cd --- /dev/null +++ b/src/api/types/ServerMessageTransferDestinationRequestType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "transfer-destination-request" is sent when the model is requesting transfer but destination is unknown. */ +export const ServerMessageTransferDestinationRequestType = { + TransferDestinationRequest: "transfer-destination-request", +} as const; +export type ServerMessageTransferDestinationRequestType = + (typeof ServerMessageTransferDestinationRequestType)[keyof typeof ServerMessageTransferDestinationRequestType]; diff --git a/src/api/types/ServerMessageTransferUpdate.ts b/src/api/types/ServerMessageTransferUpdate.ts index e26f7d2c..f8f0d09b 100644 --- a/src/api/types/ServerMessageTransferUpdate.ts +++ b/src/api/types/ServerMessageTransferUpdate.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageTransferUpdate { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageTransferUpdatePhoneNumber; /** This is the type of the message. "transfer-update" is sent whenever a transfer happens. */ - type: "transfer-update"; + type: Vapi.ServerMessageTransferUpdateType; /** This is the destination of the transfer. */ destination?: Vapi.ServerMessageTransferUpdateDestination; /** This is the timestamp of the message. */ diff --git a/src/api/types/ServerMessageTransferUpdateDestination.ts b/src/api/types/ServerMessageTransferUpdateDestination.ts index 82865095..6530f75c 100644 --- a/src/api/types/ServerMessageTransferUpdateDestination.ts +++ b/src/api/types/ServerMessageTransferUpdateDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination of the transfer. diff --git a/src/api/types/ServerMessageTransferUpdatePhoneNumber.ts b/src/api/types/ServerMessageTransferUpdatePhoneNumber.ts index 0a59ea73..cd1dc08e 100644 --- a/src/api/types/ServerMessageTransferUpdatePhoneNumber.ts +++ b/src/api/types/ServerMessageTransferUpdatePhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageTransferUpdateType.ts b/src/api/types/ServerMessageTransferUpdateType.ts new file mode 100644 index 00000000..c1b53414 --- /dev/null +++ b/src/api/types/ServerMessageTransferUpdateType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "transfer-update" is sent whenever a transfer happens. */ +export const ServerMessageTransferUpdateType = { + TransferUpdate: "transfer-update", +} as const; +export type ServerMessageTransferUpdateType = + (typeof ServerMessageTransferUpdateType)[keyof typeof ServerMessageTransferUpdateType]; diff --git a/src/api/types/ServerMessageUserInterrupted.ts b/src/api/types/ServerMessageUserInterrupted.ts index e34ce7fa..afba7597 100644 --- a/src/api/types/ServerMessageUserInterrupted.ts +++ b/src/api/types/ServerMessageUserInterrupted.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageUserInterrupted { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageUserInterruptedPhoneNumber; /** This is the type of the message. "user-interrupted" is sent when the user interrupts the assistant. */ - type: "user-interrupted"; + type: Vapi.ServerMessageUserInterruptedType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageUserInterruptedPhoneNumber.ts b/src/api/types/ServerMessageUserInterruptedPhoneNumber.ts index 0401c4c6..25c6d0ef 100644 --- a/src/api/types/ServerMessageUserInterruptedPhoneNumber.ts +++ b/src/api/types/ServerMessageUserInterruptedPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageUserInterruptedType.ts b/src/api/types/ServerMessageUserInterruptedType.ts new file mode 100644 index 00000000..c0f8d9ed --- /dev/null +++ b/src/api/types/ServerMessageUserInterruptedType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "user-interrupted" is sent when the user interrupts the assistant. */ +export const ServerMessageUserInterruptedType = { + UserInterrupted: "user-interrupted", +} as const; +export type ServerMessageUserInterruptedType = + (typeof ServerMessageUserInterruptedType)[keyof typeof ServerMessageUserInterruptedType]; diff --git a/src/api/types/ServerMessageVoiceInput.ts b/src/api/types/ServerMessageVoiceInput.ts index 8cc73c41..0cb94af4 100644 --- a/src/api/types/ServerMessageVoiceInput.ts +++ b/src/api/types/ServerMessageVoiceInput.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageVoiceInput { /** This is the phone number that the message is associated with. */ phoneNumber?: Vapi.ServerMessageVoiceInputPhoneNumber; /** This is the type of the message. "voice-input" is sent when a generation is requested from voice provider. */ - type: "voice-input"; + type: Vapi.ServerMessageVoiceInputType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageVoiceInputPhoneNumber.ts b/src/api/types/ServerMessageVoiceInputPhoneNumber.ts index 0dcce727..34f965b8 100644 --- a/src/api/types/ServerMessageVoiceInputPhoneNumber.ts +++ b/src/api/types/ServerMessageVoiceInputPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageVoiceInputType.ts b/src/api/types/ServerMessageVoiceInputType.ts new file mode 100644 index 00000000..a166e893 --- /dev/null +++ b/src/api/types/ServerMessageVoiceInputType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the message. "voice-input" is sent when a generation is requested from voice provider. */ +export const ServerMessageVoiceInputType = { + VoiceInput: "voice-input", +} as const; +export type ServerMessageVoiceInputType = + (typeof ServerMessageVoiceInputType)[keyof typeof ServerMessageVoiceInputType]; diff --git a/src/api/types/ServerMessageVoiceRequest.ts b/src/api/types/ServerMessageVoiceRequest.ts index 269e3bcf..021c3850 100644 --- a/src/api/types/ServerMessageVoiceRequest.ts +++ b/src/api/types/ServerMessageVoiceRequest.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ServerMessageVoiceRequest { /** This is the phone number that the message is associated with. */ @@ -31,7 +29,7 @@ export interface ServerMessageVoiceRequest { * }); * ``` */ - type: "voice-request"; + type: Vapi.ServerMessageVoiceRequestType; /** This is the timestamp of the message. */ timestamp?: number; /** diff --git a/src/api/types/ServerMessageVoiceRequestPhoneNumber.ts b/src/api/types/ServerMessageVoiceRequestPhoneNumber.ts index 1d07a43f..ed268286 100644 --- a/src/api/types/ServerMessageVoiceRequestPhoneNumber.ts +++ b/src/api/types/ServerMessageVoiceRequestPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the phone number that the message is associated with. diff --git a/src/api/types/ServerMessageVoiceRequestType.ts b/src/api/types/ServerMessageVoiceRequestType.ts new file mode 100644 index 00000000..0c378fc6 --- /dev/null +++ b/src/api/types/ServerMessageVoiceRequestType.ts @@ -0,0 +1,31 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the message. "voice-request" is sent when using `assistant.voice={ "type": "custom-voice" }`. + * + * Here is what the request will look like: + * + * POST https://{assistant.voice.server.url} + * Content-Type: application/json + * + * { + * "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); + * }); + * ``` + */ +export const ServerMessageVoiceRequestType = { + VoiceRequest: "voice-request", +} as const; +export type ServerMessageVoiceRequestType = + (typeof ServerMessageVoiceRequestType)[keyof typeof ServerMessageVoiceRequestType]; diff --git a/src/api/types/SesameVoice.ts b/src/api/types/SesameVoice.ts index 6f056d3e..23f89978 100644 --- a/src/api/types/SesameVoice.ts +++ b/src/api/types/SesameVoice.ts @@ -1,18 +1,16 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SesameVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "sesame"; + provider: Vapi.SesameVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: string; /** This is the model that will be used. */ - model: "csm-1b"; + model: Vapi.SesameVoiceModel; /** This is the plan for chunking the model output before it is sent to the voice provider. */ chunkPlan?: Vapi.ChunkPlan; /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */ diff --git a/src/api/types/SesameVoiceModel.ts b/src/api/types/SesameVoiceModel.ts new file mode 100644 index 00000000..a10df12d --- /dev/null +++ b/src/api/types/SesameVoiceModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used. */ +export const SesameVoiceModel = { + Csm1B: "csm-1b", +} as const; +export type SesameVoiceModel = (typeof SesameVoiceModel)[keyof typeof SesameVoiceModel]; diff --git a/src/api/types/SesameVoiceProvider.ts b/src/api/types/SesameVoiceProvider.ts new file mode 100644 index 00000000..97dc5b20 --- /dev/null +++ b/src/api/types/SesameVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const SesameVoiceProvider = { + Sesame: "sesame", +} as const; +export type SesameVoiceProvider = (typeof SesameVoiceProvider)[keyof typeof SesameVoiceProvider]; diff --git a/src/api/types/Session.ts b/src/api/types/Session.ts index f0c5d2af..780cd04e 100644 --- a/src/api/types/Session.ts +++ b/src/api/types/Session.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Session { /** This is the unique identifier for the session. */ @@ -13,6 +11,10 @@ export interface Session { createdAt: string; /** This is the ISO 8601 timestamp indicating when the session was last updated. */ updatedAt: string; + /** This is the cost of the session in USD. */ + cost?: number; + /** These are the costs of individual components of the session in USD. */ + costs?: Vapi.SessionCostsItem[]; /** This is a user-defined name for the session. Maximum length is 40 characters. */ name?: string; /** This is the current status of the session. Can be either 'active' or 'completed'. */ diff --git a/src/api/types/SessionCost.ts b/src/api/types/SessionCost.ts new file mode 100644 index 00000000..696680b3 --- /dev/null +++ b/src/api/types/SessionCost.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface SessionCost { + /** This is the type of cost, always 'session' for this class. */ + type: Vapi.SessionCostType; + /** This is the cost of the component in USD. */ + cost: number; +} diff --git a/src/api/types/SessionCostType.ts b/src/api/types/SessionCostType.ts new file mode 100644 index 00000000..3f34df89 --- /dev/null +++ b/src/api/types/SessionCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'session' for this class. */ +export const SessionCostType = { + Session: "session", +} as const; +export type SessionCostType = (typeof SessionCostType)[keyof typeof SessionCostType]; diff --git a/src/api/types/SessionCostsItem.ts b/src/api/types/SessionCostsItem.ts new file mode 100644 index 00000000..611d720a --- /dev/null +++ b/src/api/types/SessionCostsItem.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type SessionCostsItem = Vapi.ModelCost | Vapi.AnalysisCost | Vapi.SessionCost; diff --git a/src/api/types/SessionMessagesItem.ts b/src/api/types/SessionMessagesItem.ts index e1843510..905c046a 100644 --- a/src/api/types/SessionMessagesItem.ts +++ b/src/api/types/SessionMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type SessionMessagesItem = | Vapi.SystemMessage diff --git a/src/api/types/SessionPaginatedResponse.ts b/src/api/types/SessionPaginatedResponse.ts index ee576fde..afe6ab0d 100644 --- a/src/api/types/SessionPaginatedResponse.ts +++ b/src/api/types/SessionPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SessionPaginatedResponse { results: Vapi.Session[]; diff --git a/src/api/types/SessionStatus.ts b/src/api/types/SessionStatus.ts index e2c82f01..53485761 100644 --- a/src/api/types/SessionStatus.ts +++ b/src/api/types/SessionStatus.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the current status of the session. Can be either 'active' or 'completed'. - */ -export type SessionStatus = "active" | "completed"; +/** This is the current status of the session. Can be either 'active' or 'completed'. */ export const SessionStatus = { Active: "active", Completed: "completed", } as const; +export type SessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus]; diff --git a/src/api/types/SipAuthentication.ts b/src/api/types/SipAuthentication.ts index 396a5f6a..a884fb5b 100644 --- a/src/api/types/SipAuthentication.ts +++ b/src/api/types/SipAuthentication.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SipAuthentication { /** This will be expected in the `realm` field of the `authorization` header of the SIP INVITE. Defaults to sip.vapi.ai. */ diff --git a/src/api/types/SipTrunkGateway.ts b/src/api/types/SipTrunkGateway.ts index c72608b2..b33c8022 100644 --- a/src/api/types/SipTrunkGateway.ts +++ b/src/api/types/SipTrunkGateway.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SipTrunkGateway { /** 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. */ diff --git a/src/api/types/SipTrunkGatewayOutboundProtocol.ts b/src/api/types/SipTrunkGatewayOutboundProtocol.ts index 77ea7671..ef35c01d 100644 --- a/src/api/types/SipTrunkGatewayOutboundProtocol.ts +++ b/src/api/types/SipTrunkGatewayOutboundProtocol.ts @@ -1,16 +1,15 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the protocol to use for SIP signaling outbound calls. Default is udp. * * @default udp */ -export type SipTrunkGatewayOutboundProtocol = "tls/srtp" | "tcp" | "tls" | "udp"; export const SipTrunkGatewayOutboundProtocol = { TlsSrtp: "tls/srtp", Tcp: "tcp", Tls: "tls", Udp: "udp", } as const; +export type SipTrunkGatewayOutboundProtocol = + (typeof SipTrunkGatewayOutboundProtocol)[keyof typeof SipTrunkGatewayOutboundProtocol]; diff --git a/src/api/types/SipTrunkOutboundAuthenticationPlan.ts b/src/api/types/SipTrunkOutboundAuthenticationPlan.ts index af2dd3cf..f2d0a262 100644 --- a/src/api/types/SipTrunkOutboundAuthenticationPlan.ts +++ b/src/api/types/SipTrunkOutboundAuthenticationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SipTrunkOutboundAuthenticationPlan { /** This is not returned in the API. */ diff --git a/src/api/types/SipTrunkOutboundSipRegisterPlan.ts b/src/api/types/SipTrunkOutboundSipRegisterPlan.ts index 0a292c8c..6a4b4f42 100644 --- a/src/api/types/SipTrunkOutboundSipRegisterPlan.ts +++ b/src/api/types/SipTrunkOutboundSipRegisterPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SipTrunkOutboundSipRegisterPlan { domain?: string; diff --git a/src/api/types/SlackOAuth2AuthorizationCredential.ts b/src/api/types/SlackOAuth2AuthorizationCredential.ts index cf188b6c..056cdc73 100644 --- a/src/api/types/SlackOAuth2AuthorizationCredential.ts +++ b/src/api/types/SlackOAuth2AuthorizationCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface SlackOAuth2AuthorizationCredential { - provider: "slack.oauth2-authorization"; + provider: Vapi.SlackOAuth2AuthorizationCredentialProvider; /** The authorization ID for the OAuth2 authorization */ authorizationId: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/SlackOAuth2AuthorizationCredentialProvider.ts b/src/api/types/SlackOAuth2AuthorizationCredentialProvider.ts new file mode 100644 index 00000000..e1350786 --- /dev/null +++ b/src/api/types/SlackOAuth2AuthorizationCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const SlackOAuth2AuthorizationCredentialProvider = { + SlackOauth2Authorization: "slack.oauth2-authorization", +} as const; +export type SlackOAuth2AuthorizationCredentialProvider = + (typeof SlackOAuth2AuthorizationCredentialProvider)[keyof typeof SlackOAuth2AuthorizationCredentialProvider]; diff --git a/src/api/types/SlackSendMessageTool.ts b/src/api/types/SlackSendMessageTool.ts index 9fde7984..ac216f4c 100644 --- a/src/api/types/SlackSendMessageTool.ts +++ b/src/api/types/SlackSendMessageTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SlackSendMessageTool { /** diff --git a/src/api/types/SlackSendMessageToolMessagesItem.ts b/src/api/types/SlackSendMessageToolMessagesItem.ts index 746e5398..43848146 100644 --- a/src/api/types/SlackSendMessageToolMessagesItem.ts +++ b/src/api/types/SlackSendMessageToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type SlackSendMessageToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/SmallestAiCredential.ts b/src/api/types/SmallestAiCredential.ts index e345cb8d..31257340 100644 --- a/src/api/types/SmallestAiCredential.ts +++ b/src/api/types/SmallestAiCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface SmallestAiCredential { - provider: "smallest-ai"; + provider: Vapi.SmallestAiCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/SmallestAiCredentialProvider.ts b/src/api/types/SmallestAiCredentialProvider.ts new file mode 100644 index 00000000..c46e70aa --- /dev/null +++ b/src/api/types/SmallestAiCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const SmallestAiCredentialProvider = { + SmallestAi: "smallest-ai", +} as const; +export type SmallestAiCredentialProvider = + (typeof SmallestAiCredentialProvider)[keyof typeof SmallestAiCredentialProvider]; diff --git a/src/api/types/SmallestAiVoice.ts b/src/api/types/SmallestAiVoice.ts index ca745a9f..55402edd 100644 --- a/src/api/types/SmallestAiVoice.ts +++ b/src/api/types/SmallestAiVoice.ts @@ -1,18 +1,16 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SmallestAiVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "smallest-ai"; + provider: Vapi.SmallestAiVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.SmallestAiVoiceId; /** Smallest AI voice model to use. Defaults to 'lightning' when not specified. */ - model?: "lightning"; + model?: Vapi.SmallestAiVoiceModel; /** This is the speed multiplier that will be used. */ speed?: number; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/SmallestAiVoiceId.ts b/src/api/types/SmallestAiVoiceId.ts index efd434aa..a5a5705a 100644 --- a/src/api/types/SmallestAiVoiceId.ts +++ b/src/api/types/SmallestAiVoiceId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. diff --git a/src/api/types/SmallestAiVoiceIdEnum.ts b/src/api/types/SmallestAiVoiceIdEnum.ts index 3dd4ea7f..34408dae 100644 --- a/src/api/types/SmallestAiVoiceIdEnum.ts +++ b/src/api/types/SmallestAiVoiceIdEnum.ts @@ -1,33 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type SmallestAiVoiceIdEnum = - | "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"; export const SmallestAiVoiceIdEnum = { Emily: "emily", Jasmine: "jasmine", @@ -55,3 +27,4 @@ export const SmallestAiVoiceIdEnum = { Saina: "saina", Sanya: "sanya", } as const; +export type SmallestAiVoiceIdEnum = (typeof SmallestAiVoiceIdEnum)[keyof typeof SmallestAiVoiceIdEnum]; diff --git a/src/api/types/SmallestAiVoiceModel.ts b/src/api/types/SmallestAiVoiceModel.ts new file mode 100644 index 00000000..c42f470c --- /dev/null +++ b/src/api/types/SmallestAiVoiceModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Smallest AI voice model to use. Defaults to 'lightning' when not specified. */ +export const SmallestAiVoiceModel = { + Lightning: "lightning", +} as const; +export type SmallestAiVoiceModel = (typeof SmallestAiVoiceModel)[keyof typeof SmallestAiVoiceModel]; diff --git a/src/api/types/SmallestAiVoiceProvider.ts b/src/api/types/SmallestAiVoiceProvider.ts new file mode 100644 index 00000000..cce8c7f7 --- /dev/null +++ b/src/api/types/SmallestAiVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const SmallestAiVoiceProvider = { + SmallestAi: "smallest-ai", +} as const; +export type SmallestAiVoiceProvider = (typeof SmallestAiVoiceProvider)[keyof typeof SmallestAiVoiceProvider]; diff --git a/src/api/types/SmartDenoisingPlan.ts b/src/api/types/SmartDenoisingPlan.ts index 505211a2..5bb2fa46 100644 --- a/src/api/types/SmartDenoisingPlan.ts +++ b/src/api/types/SmartDenoisingPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SmartDenoisingPlan { /** Whether smart denoising using Krisp is enabled. */ diff --git a/src/api/types/SmsTool.ts b/src/api/types/SmsTool.ts index 0b4e1fb6..fbcaac4b 100644 --- a/src/api/types/SmsTool.ts +++ b/src/api/types/SmsTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SmsTool { /** diff --git a/src/api/types/SmsToolMessagesItem.ts b/src/api/types/SmsToolMessagesItem.ts index f8f20a7e..e13e9c00 100644 --- a/src/api/types/SmsToolMessagesItem.ts +++ b/src/api/types/SmsToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type SmsToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/SpeechmaticsCredential.ts b/src/api/types/SpeechmaticsCredential.ts index b08ba5b9..dec8457b 100644 --- a/src/api/types/SpeechmaticsCredential.ts +++ b/src/api/types/SpeechmaticsCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface SpeechmaticsCredential { - provider: "speechmatics"; + provider: Vapi.SpeechmaticsCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/SpeechmaticsCredentialProvider.ts b/src/api/types/SpeechmaticsCredentialProvider.ts new file mode 100644 index 00000000..e0767d7c --- /dev/null +++ b/src/api/types/SpeechmaticsCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const SpeechmaticsCredentialProvider = { + Speechmatics: "speechmatics", +} as const; +export type SpeechmaticsCredentialProvider = + (typeof SpeechmaticsCredentialProvider)[keyof typeof SpeechmaticsCredentialProvider]; diff --git a/src/api/types/SpeechmaticsCustomVocabularyItem.ts b/src/api/types/SpeechmaticsCustomVocabularyItem.ts index 641fd4a9..d1cb530c 100644 --- a/src/api/types/SpeechmaticsCustomVocabularyItem.ts +++ b/src/api/types/SpeechmaticsCustomVocabularyItem.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SpeechmaticsCustomVocabularyItem { /** The word or phrase to add to the custom vocabulary. */ diff --git a/src/api/types/SpeechmaticsTranscriber.ts b/src/api/types/SpeechmaticsTranscriber.ts index 9402a753..355d4de5 100644 --- a/src/api/types/SpeechmaticsTranscriber.ts +++ b/src/api/types/SpeechmaticsTranscriber.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SpeechmaticsTranscriber { /** This is the transcription provider that will be used. */ - provider: "speechmatics"; + provider: Vapi.SpeechmaticsTranscriberProvider; /** This is the model that will be used for the transcription. */ - model?: "default"; + model?: Vapi.SpeechmaticsTranscriberModel; language?: Vapi.SpeechmaticsTranscriberLanguage; /** * 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. @@ -34,6 +32,8 @@ export interface SpeechmaticsTranscriber { * @default 2 */ maxSpeakers?: number; + /** Provides friendly speaker labels that map to diarization indices (Speaker 1 -> labels[0]). */ + speakerLabels?: string[]; /** * This enables partial transcripts during speech recognition. When false, only final transcripts are returned. * diff --git a/src/api/types/SpeechmaticsTranscriberLanguage.ts b/src/api/types/SpeechmaticsTranscriberLanguage.ts index 7812b9dd..b4515284 100644 --- a/src/api/types/SpeechmaticsTranscriberLanguage.ts +++ b/src/api/types/SpeechmaticsTranscriberLanguage.ts @@ -1,64 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type SpeechmaticsTranscriberLanguage = - | "auto" - | "ar" - | "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" - | "mt" - | "cmn" - | "mr" - | "mn" - | "no" - | "fa" - | "pl" - | "pt" - | "ro" - | "ru" - | "sk" - | "sl" - | "es" - | "sw" - | "sv" - | "ta" - | "th" - | "tr" - | "uk" - | "ur" - | "ug" - | "vi" - | "cy"; export const SpeechmaticsTranscriberLanguage = { Auto: "auto", Ar: "ar", @@ -117,3 +58,5 @@ export const SpeechmaticsTranscriberLanguage = { Vi: "vi", Cy: "cy", } as const; +export type SpeechmaticsTranscriberLanguage = + (typeof SpeechmaticsTranscriberLanguage)[keyof typeof SpeechmaticsTranscriberLanguage]; diff --git a/src/api/types/SpeechmaticsTranscriberModel.ts b/src/api/types/SpeechmaticsTranscriberModel.ts new file mode 100644 index 00000000..1d846b6b --- /dev/null +++ b/src/api/types/SpeechmaticsTranscriberModel.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used for the transcription. */ +export const SpeechmaticsTranscriberModel = { + Default: "default", +} as const; +export type SpeechmaticsTranscriberModel = + (typeof SpeechmaticsTranscriberModel)[keyof typeof SpeechmaticsTranscriberModel]; diff --git a/src/api/types/SpeechmaticsTranscriberNumeralStyle.ts b/src/api/types/SpeechmaticsTranscriberNumeralStyle.ts index e986bcc3..1c9e27af 100644 --- a/src/api/types/SpeechmaticsTranscriberNumeralStyle.ts +++ b/src/api/types/SpeechmaticsTranscriberNumeralStyle.ts @@ -1,14 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This controls how numbers are formatted in the transcription output. * * @default 'written' */ -export type SpeechmaticsTranscriberNumeralStyle = "written" | "spoken"; export const SpeechmaticsTranscriberNumeralStyle = { Written: "written", Spoken: "spoken", } as const; +export type SpeechmaticsTranscriberNumeralStyle = + (typeof SpeechmaticsTranscriberNumeralStyle)[keyof typeof SpeechmaticsTranscriberNumeralStyle]; diff --git a/src/api/types/SpeechmaticsTranscriberOperatingPoint.ts b/src/api/types/SpeechmaticsTranscriberOperatingPoint.ts index 5782358b..6549838c 100644 --- a/src/api/types/SpeechmaticsTranscriberOperatingPoint.ts +++ b/src/api/types/SpeechmaticsTranscriberOperatingPoint.ts @@ -1,14 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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. * * @default 'enhanced' */ -export type SpeechmaticsTranscriberOperatingPoint = "standard" | "enhanced"; export const SpeechmaticsTranscriberOperatingPoint = { Standard: "standard", Enhanced: "enhanced", } as const; +export type SpeechmaticsTranscriberOperatingPoint = + (typeof SpeechmaticsTranscriberOperatingPoint)[keyof typeof SpeechmaticsTranscriberOperatingPoint]; diff --git a/src/api/types/SpeechmaticsTranscriberProvider.ts b/src/api/types/SpeechmaticsTranscriberProvider.ts new file mode 100644 index 00000000..36cd1712 --- /dev/null +++ b/src/api/types/SpeechmaticsTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const SpeechmaticsTranscriberProvider = { + Speechmatics: "speechmatics", +} as const; +export type SpeechmaticsTranscriberProvider = + (typeof SpeechmaticsTranscriberProvider)[keyof typeof SpeechmaticsTranscriberProvider]; diff --git a/src/api/types/SpeechmaticsTranscriberRegion.ts b/src/api/types/SpeechmaticsTranscriberRegion.ts index 8d6545af..44189cd2 100644 --- a/src/api/types/SpeechmaticsTranscriberRegion.ts +++ b/src/api/types/SpeechmaticsTranscriberRegion.ts @@ -1,14 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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' */ -export type SpeechmaticsTranscriberRegion = "eu" | "us"; export const SpeechmaticsTranscriberRegion = { Eu: "eu", Us: "us", } as const; +export type SpeechmaticsTranscriberRegion = + (typeof SpeechmaticsTranscriberRegion)[keyof typeof SpeechmaticsTranscriberRegion]; diff --git a/src/api/types/SqlInjectionSecurityFilter.ts b/src/api/types/SqlInjectionSecurityFilter.ts index 29be430d..ea36522d 100644 --- a/src/api/types/SqlInjectionSecurityFilter.ts +++ b/src/api/types/SqlInjectionSecurityFilter.ts @@ -1,8 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface SqlInjectionSecurityFilter { /** The type of security threat to filter. */ - type: "sql-injection"; + type: Vapi.SqlInjectionSecurityFilterType; } diff --git a/src/api/types/SqlInjectionSecurityFilterType.ts b/src/api/types/SqlInjectionSecurityFilterType.ts new file mode 100644 index 00000000..c7484f4f --- /dev/null +++ b/src/api/types/SqlInjectionSecurityFilterType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of security threat to filter. */ +export const SqlInjectionSecurityFilterType = { + SqlInjection: "sql-injection", +} as const; +export type SqlInjectionSecurityFilterType = + (typeof SqlInjectionSecurityFilterType)[keyof typeof SqlInjectionSecurityFilterType]; diff --git a/src/api/types/Squad.ts b/src/api/types/Squad.ts index 982c6abc..0d39cd46 100644 --- a/src/api/types/Squad.ts +++ b/src/api/types/Squad.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Squad { /** This is the name of the squad. */ diff --git a/src/api/types/SquadMemberDto.ts b/src/api/types/SquadMemberDto.ts index f9f620d6..9131dce2 100644 --- a/src/api/types/SquadMemberDto.ts +++ b/src/api/types/SquadMemberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SquadMemberDto { assistantDestinations?: Vapi.SquadMemberDtoAssistantDestinationsItem[]; diff --git a/src/api/types/SquadMemberDtoAssistantDestinationsItem.ts b/src/api/types/SquadMemberDtoAssistantDestinationsItem.ts index ee8035d8..9d4706ee 100644 --- a/src/api/types/SquadMemberDtoAssistantDestinationsItem.ts +++ b/src/api/types/SquadMemberDtoAssistantDestinationsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type SquadMemberDtoAssistantDestinationsItem = | Vapi.TransferDestinationAssistant diff --git a/src/api/types/SsrfSecurityFilter.ts b/src/api/types/SsrfSecurityFilter.ts index 050d62e4..bb371911 100644 --- a/src/api/types/SsrfSecurityFilter.ts +++ b/src/api/types/SsrfSecurityFilter.ts @@ -1,8 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface SsrfSecurityFilter { /** The type of security threat to filter. */ - type: "ssrf"; + type: Vapi.SsrfSecurityFilterType; } diff --git a/src/api/types/SsrfSecurityFilterType.ts b/src/api/types/SsrfSecurityFilterType.ts new file mode 100644 index 00000000..3007eec6 --- /dev/null +++ b/src/api/types/SsrfSecurityFilterType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of security threat to filter. */ +export const SsrfSecurityFilterType = { + Ssrf: "ssrf", +} as const; +export type SsrfSecurityFilterType = (typeof SsrfSecurityFilterType)[keyof typeof SsrfSecurityFilterType]; diff --git a/src/api/types/StartSpeakingPlan.ts b/src/api/types/StartSpeakingPlan.ts index 36389aa3..024cbb2b 100644 --- a/src/api/types/StartSpeakingPlan.ts +++ b/src/api/types/StartSpeakingPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface StartSpeakingPlan { /** diff --git a/src/api/types/StartSpeakingPlanCustomEndpointingRulesItem.ts b/src/api/types/StartSpeakingPlanCustomEndpointingRulesItem.ts index 7e002c0f..ea979eb1 100644 --- a/src/api/types/StartSpeakingPlanCustomEndpointingRulesItem.ts +++ b/src/api/types/StartSpeakingPlanCustomEndpointingRulesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type StartSpeakingPlanCustomEndpointingRulesItem = | Vapi.AssistantCustomEndpointingRule diff --git a/src/api/types/StartSpeakingPlanSmartEndpointingEnabled.ts b/src/api/types/StartSpeakingPlanSmartEndpointingEnabled.ts index a364f407..fdaa74aa 100644 --- a/src/api/types/StartSpeakingPlanSmartEndpointingEnabled.ts +++ b/src/api/types/StartSpeakingPlanSmartEndpointingEnabled.ts @@ -1,5 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type StartSpeakingPlanSmartEndpointingEnabled = boolean | "livekit"; +import type * as Vapi from "../index.js"; + +export type StartSpeakingPlanSmartEndpointingEnabled = boolean | Vapi.StartSpeakingPlanSmartEndpointingEnabledOne; diff --git a/src/api/types/StartSpeakingPlanSmartEndpointingEnabledOne.ts b/src/api/types/StartSpeakingPlanSmartEndpointingEnabledOne.ts new file mode 100644 index 00000000..b00c0683 --- /dev/null +++ b/src/api/types/StartSpeakingPlanSmartEndpointingEnabledOne.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const StartSpeakingPlanSmartEndpointingEnabledOne = { + Livekit: "livekit", +} as const; +export type StartSpeakingPlanSmartEndpointingEnabledOne = + (typeof StartSpeakingPlanSmartEndpointingEnabledOne)[keyof typeof StartSpeakingPlanSmartEndpointingEnabledOne]; diff --git a/src/api/types/StartSpeakingPlanSmartEndpointingPlan.ts b/src/api/types/StartSpeakingPlanSmartEndpointingPlan.ts index 8b1392de..304a5f5b 100644 --- a/src/api/types/StartSpeakingPlanSmartEndpointingPlan.ts +++ b/src/api/types/StartSpeakingPlanSmartEndpointingPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * 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. diff --git a/src/api/types/StopSpeakingPlan.ts b/src/api/types/StopSpeakingPlan.ts index 01672ad1..9905f2cb 100644 --- a/src/api/types/StopSpeakingPlan.ts +++ b/src/api/types/StopSpeakingPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface StopSpeakingPlan { /** diff --git a/src/api/types/StructuredDataMultiPlan.ts b/src/api/types/StructuredDataMultiPlan.ts index a7ca8333..213da004 100644 --- a/src/api/types/StructuredDataMultiPlan.ts +++ b/src/api/types/StructuredDataMultiPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface StructuredDataMultiPlan { /** This is the key of the structured data plan in the catalog. */ diff --git a/src/api/types/StructuredDataPlan.ts b/src/api/types/StructuredDataPlan.ts index 374d153d..f5ad8258 100644 --- a/src/api/types/StructuredDataPlan.ts +++ b/src/api/types/StructuredDataPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface StructuredDataPlan { /** diff --git a/src/api/types/StructuredOutput.ts b/src/api/types/StructuredOutput.ts index 145b561a..1c9b8cb5 100644 --- a/src/api/types/StructuredOutput.ts +++ b/src/api/types/StructuredOutput.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface StructuredOutput { /** @@ -21,6 +19,8 @@ export interface StructuredOutput { * If messages or required fields are not specified, the default system and user prompts will be used. */ model?: Vapi.StructuredOutputModel; + /** Compliance configuration for this output. Only enable overrides if no sensitive data will be stored. */ + compliancePlan?: Vapi.ComplianceOverride; /** This is the unique identifier for the structured output. */ id: string; /** This is the unique identifier for the org that this structured output belongs to. */ diff --git a/src/api/resources/calls/types/CallControllerFindAllPaginatedRequestStructuredOutputsValue.ts b/src/api/types/StructuredOutputFilterDto.ts similarity index 70% rename from src/api/resources/calls/types/CallControllerFindAllPaginatedRequestStructuredOutputsValue.ts rename to src/api/types/StructuredOutputFilterDto.ts index 0ca6755d..ea29ea0d 100644 --- a/src/api/resources/calls/types/CallControllerFindAllPaginatedRequestStructuredOutputsValue.ts +++ b/src/api/types/StructuredOutputFilterDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export interface CallControllerFindAllPaginatedRequestStructuredOutputsValue { +export interface StructuredOutputFilterDto { /** Equal to */ eq?: string; /** Not equal to */ diff --git a/src/api/types/StructuredOutputModel.ts b/src/api/types/StructuredOutputModel.ts index 2c4aa5e6..defccb85 100644 --- a/src/api/types/StructuredOutputModel.ts +++ b/src/api/types/StructuredOutputModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the model that will be used to extract the structured output. diff --git a/src/api/types/StructuredOutputPaginatedResponse.ts b/src/api/types/StructuredOutputPaginatedResponse.ts index 0c5d1932..7ac44137 100644 --- a/src/api/types/StructuredOutputPaginatedResponse.ts +++ b/src/api/types/StructuredOutputPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface StructuredOutputPaginatedResponse { results: Vapi.StructuredOutput[]; diff --git a/src/api/types/Subscription.ts b/src/api/types/Subscription.ts index a14aafef..18ba3c4f 100644 --- a/src/api/types/Subscription.ts +++ b/src/api/types/Subscription.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Subscription { /** This is the unique identifier for the subscription. */ @@ -54,6 +52,11 @@ export interface Subscription { * subscription have the option to enable HIPAA compliance. */ hipaaEnabled?: boolean; + /** + * This is the data retention enabled flag for the subscription. It determines whether orgs under this + * subscription have the option to enable data retention. + */ + dataRetentionEnabled?: boolean; /** This is the ID for the Common Paper agreement outlining the HIPAA contract. */ hipaaCommonPaperAgreementId?: string; /** diff --git a/src/api/types/SubscriptionLimits.ts b/src/api/types/SubscriptionLimits.ts new file mode 100644 index 00000000..b491202d --- /dev/null +++ b/src/api/types/SubscriptionLimits.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface SubscriptionLimits { + /** True if this call was blocked by the Call Concurrency limit */ + concurrencyBlocked?: boolean; + /** Account Call Concurrency limit */ + concurrencyLimit?: number; + /** Incremental number of concurrent calls that will be allowed, including this call */ + remainingConcurrentCalls?: number; +} diff --git a/src/api/types/SubscriptionMinutesIncludedResetFrequency.ts b/src/api/types/SubscriptionMinutesIncludedResetFrequency.ts index 53c58732..e4ffb6c7 100644 --- a/src/api/types/SubscriptionMinutesIncludedResetFrequency.ts +++ b/src/api/types/SubscriptionMinutesIncludedResetFrequency.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the minutes_included reset frequency for the subscription. - */ -export type SubscriptionMinutesIncludedResetFrequency = "monthly" | "annually"; +/** This is the minutes_included reset frequency for the subscription. */ export const SubscriptionMinutesIncludedResetFrequency = { Monthly: "monthly", Annually: "annually", } as const; +export type SubscriptionMinutesIncludedResetFrequency = + (typeof SubscriptionMinutesIncludedResetFrequency)[keyof typeof SubscriptionMinutesIncludedResetFrequency]; diff --git a/src/api/types/SubscriptionStatus.ts b/src/api/types/SubscriptionStatus.ts index 14855df6..7ede4436 100644 --- a/src/api/types/SubscriptionStatus.ts +++ b/src/api/types/SubscriptionStatus.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the status of the subscription. Past due subscriptions are subscriptions * with past due payments. */ -export type SubscriptionStatus = "active" | "frozen"; export const SubscriptionStatus = { Active: "active", Frozen: "frozen", } as const; +export type SubscriptionStatus = (typeof SubscriptionStatus)[keyof typeof SubscriptionStatus]; diff --git a/src/api/types/SubscriptionType.ts b/src/api/types/SubscriptionType.ts index 82dd62b5..46af4b66 100644 --- a/src/api/types/SubscriptionType.ts +++ b/src/api/types/SubscriptionType.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the type / tier of the subscription. - */ -export type SubscriptionType = "pay-as-you-go" | "enterprise" | "agency" | "startup" | "growth" | "scale"; +/** This is the type / tier of the subscription. */ export const SubscriptionType = { PayAsYouGo: "pay-as-you-go", Enterprise: "enterprise", @@ -14,3 +9,4 @@ export const SubscriptionType = { Growth: "growth", Scale: "scale", } as const; +export type SubscriptionType = (typeof SubscriptionType)[keyof typeof SubscriptionType]; diff --git a/src/api/types/SuccessEvaluationPlan.ts b/src/api/types/SuccessEvaluationPlan.ts index 43de82f5..33012138 100644 --- a/src/api/types/SuccessEvaluationPlan.ts +++ b/src/api/types/SuccessEvaluationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SuccessEvaluationPlan { /** diff --git a/src/api/types/SuccessEvaluationPlanRubric.ts b/src/api/types/SuccessEvaluationPlanRubric.ts index a0775eb3..6586df79 100644 --- a/src/api/types/SuccessEvaluationPlanRubric.ts +++ b/src/api/types/SuccessEvaluationPlanRubric.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This enforces the rubric of the evaluation. The output is stored in `call.analysis.successEvaluation`. @@ -17,15 +15,6 @@ * * Default is 'PassFail'. */ -export type SuccessEvaluationPlanRubric = - | "NumericScale" - | "DescriptiveScale" - | "Checklist" - | "Matrix" - | "PercentageScale" - | "LikertScale" - | "AutomaticRubric" - | "PassFail"; export const SuccessEvaluationPlanRubric = { NumericScale: "NumericScale", DescriptiveScale: "DescriptiveScale", @@ -36,3 +25,5 @@ export const SuccessEvaluationPlanRubric = { AutomaticRubric: "AutomaticRubric", PassFail: "PassFail", } as const; +export type SuccessEvaluationPlanRubric = + (typeof SuccessEvaluationPlanRubric)[keyof typeof SuccessEvaluationPlanRubric]; diff --git a/src/api/types/SummaryPlan.ts b/src/api/types/SummaryPlan.ts index 8361a79e..a07d2603 100644 --- a/src/api/types/SummaryPlan.ts +++ b/src/api/types/SummaryPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SummaryPlan { /** diff --git a/src/api/types/SupabaseBucketPlan.ts b/src/api/types/SupabaseBucketPlan.ts index 28cc8e7e..18392399 100644 --- a/src/api/types/SupabaseBucketPlan.ts +++ b/src/api/types/SupabaseBucketPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SupabaseBucketPlan { /** diff --git a/src/api/types/SupabaseBucketPlanRegion.ts b/src/api/types/SupabaseBucketPlanRegion.ts index 2e58a719..4b3edf78 100644 --- a/src/api/types/SupabaseBucketPlanRegion.ts +++ b/src/api/types/SupabaseBucketPlanRegion.ts @@ -1,29 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * 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 */ -export type SupabaseBucketPlanRegion = - | "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"; export const SupabaseBucketPlanRegion = { UsWest1: "us-west-1", UsEast1: "us-east-1", @@ -42,3 +23,4 @@ export const SupabaseBucketPlanRegion = { ApSoutheast2: "ap-southeast-2", SaEast1: "sa-east-1", } as const; +export type SupabaseBucketPlanRegion = (typeof SupabaseBucketPlanRegion)[keyof typeof SupabaseBucketPlanRegion]; diff --git a/src/api/types/SupabaseCredential.ts b/src/api/types/SupabaseCredential.ts index ee52103c..dd5f7f39 100644 --- a/src/api/types/SupabaseCredential.ts +++ b/src/api/types/SupabaseCredential.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SupabaseCredential { /** This is for supabase storage. */ - provider: "supabase"; + provider: Vapi.SupabaseCredentialProvider; /** This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order. */ fallbackIndex?: number; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/SupabaseCredentialProvider.ts b/src/api/types/SupabaseCredentialProvider.ts new file mode 100644 index 00000000..c2520756 --- /dev/null +++ b/src/api/types/SupabaseCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is for supabase storage. */ +export const SupabaseCredentialProvider = { + Supabase: "supabase", +} as const; +export type SupabaseCredentialProvider = (typeof SupabaseCredentialProvider)[keyof typeof SupabaseCredentialProvider]; diff --git a/src/api/types/SyncVoiceLibraryDto.ts b/src/api/types/SyncVoiceLibraryDto.ts index 592ec7a6..d528922e 100644 --- a/src/api/types/SyncVoiceLibraryDto.ts +++ b/src/api/types/SyncVoiceLibraryDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface SyncVoiceLibraryDto { /** List of providers you want to sync. */ diff --git a/src/api/types/SyncVoiceLibraryDtoProvidersItem.ts b/src/api/types/SyncVoiceLibraryDtoProvidersItem.ts index d11c8382..dad306fb 100644 --- a/src/api/types/SyncVoiceLibraryDtoProvidersItem.ts +++ b/src/api/types/SyncVoiceLibraryDtoProvidersItem.ts @@ -1,25 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type SyncVoiceLibraryDtoProvidersItem = - | "vapi" - | "11labs" - | "azure" - | "cartesia" - | "custom-voice" - | "deepgram" - | "hume" - | "lmnt" - | "neuphonic" - | "openai" - | "playht" - | "rime-ai" - | "smallest-ai" - | "tavus" - | "sesame" - | "inworld" - | "minimax"; export const SyncVoiceLibraryDtoProvidersItem = { Vapi: "vapi", ElevenLabs: "11labs", @@ -38,4 +18,7 @@ export const SyncVoiceLibraryDtoProvidersItem = { Sesame: "sesame", Inworld: "inworld", Minimax: "minimax", + Orpheus: "orpheus", } as const; +export type SyncVoiceLibraryDtoProvidersItem = + (typeof SyncVoiceLibraryDtoProvidersItem)[keyof typeof SyncVoiceLibraryDtoProvidersItem]; diff --git a/src/api/types/SystemMessage.ts b/src/api/types/SystemMessage.ts index cfa319e5..08903393 100644 --- a/src/api/types/SystemMessage.ts +++ b/src/api/types/SystemMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SystemMessage { /** The role of the system in the conversation. */ diff --git a/src/api/types/TalkscriberTranscriber.ts b/src/api/types/TalkscriberTranscriber.ts index 5b132957..19b79914 100644 --- a/src/api/types/TalkscriberTranscriber.ts +++ b/src/api/types/TalkscriberTranscriber.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TalkscriberTranscriber { /** This is the transcription provider that will be used. */ - provider: "talkscriber"; + provider: Vapi.TalkscriberTranscriberProvider; /** This is the model that will be used for the transcription. */ - model?: "whisper"; + model?: Vapi.TalkscriberTranscriberModel; /** 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 */ language?: Vapi.TalkscriberTranscriberLanguage; /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */ diff --git a/src/api/types/TalkscriberTranscriberLanguage.ts b/src/api/types/TalkscriberTranscriberLanguage.ts index 2f06b828..601a84e5 100644 --- a/src/api/types/TalkscriberTranscriberLanguage.ts +++ b/src/api/types/TalkscriberTranscriberLanguage.ts @@ -1,111 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * 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 - */ -export type TalkscriberTranscriberLanguage = - | "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"; +/** 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 */ export const TalkscriberTranscriberLanguage = { En: "en", Zh: "zh", @@ -208,3 +103,5 @@ export const TalkscriberTranscriberLanguage = { Su: "su", Yue: "yue", } as const; +export type TalkscriberTranscriberLanguage = + (typeof TalkscriberTranscriberLanguage)[keyof typeof TalkscriberTranscriberLanguage]; diff --git a/src/api/types/TalkscriberTranscriberModel.ts b/src/api/types/TalkscriberTranscriberModel.ts new file mode 100644 index 00000000..72309fbd --- /dev/null +++ b/src/api/types/TalkscriberTranscriberModel.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the model that will be used for the transcription. */ +export const TalkscriberTranscriberModel = { + Whisper: "whisper", +} as const; +export type TalkscriberTranscriberModel = + (typeof TalkscriberTranscriberModel)[keyof typeof TalkscriberTranscriberModel]; diff --git a/src/api/types/TalkscriberTranscriberProvider.ts b/src/api/types/TalkscriberTranscriberProvider.ts new file mode 100644 index 00000000..35ba1135 --- /dev/null +++ b/src/api/types/TalkscriberTranscriberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the transcription provider that will be used. */ +export const TalkscriberTranscriberProvider = { + Talkscriber: "talkscriber", +} as const; +export type TalkscriberTranscriberProvider = + (typeof TalkscriberTranscriberProvider)[keyof typeof TalkscriberTranscriberProvider]; diff --git a/src/api/types/TargetPlan.ts b/src/api/types/TargetPlan.ts index 3d6d4706..874a8bb7 100644 --- a/src/api/types/TargetPlan.ts +++ b/src/api/types/TargetPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TargetPlan { /** diff --git a/src/api/types/TavusConversationProperties.ts b/src/api/types/TavusConversationProperties.ts index 3a9a41a7..d62b734a 100644 --- a/src/api/types/TavusConversationProperties.ts +++ b/src/api/types/TavusConversationProperties.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TavusConversationProperties { /** diff --git a/src/api/types/TavusCredential.ts b/src/api/types/TavusCredential.ts index bb61e989..b6dfd72c 100644 --- a/src/api/types/TavusCredential.ts +++ b/src/api/types/TavusCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface TavusCredential { - provider: "tavus"; + provider: Vapi.TavusCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/TavusCredentialProvider.ts b/src/api/types/TavusCredentialProvider.ts new file mode 100644 index 00000000..a32c8910 --- /dev/null +++ b/src/api/types/TavusCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TavusCredentialProvider = { + Tavus: "tavus", +} as const; +export type TavusCredentialProvider = (typeof TavusCredentialProvider)[keyof typeof TavusCredentialProvider]; diff --git a/src/api/types/TavusVoice.ts b/src/api/types/TavusVoice.ts index 7a344087..d4acc3aa 100644 --- a/src/api/types/TavusVoice.ts +++ b/src/api/types/TavusVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TavusVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "tavus"; + provider: Vapi.TavusVoiceProvider; /** This is the provider-specific ID that will be used. */ voiceId: Vapi.TavusVoiceVoiceId; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/TavusVoiceProvider.ts b/src/api/types/TavusVoiceProvider.ts new file mode 100644 index 00000000..d82c8c42 --- /dev/null +++ b/src/api/types/TavusVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const TavusVoiceProvider = { + Tavus: "tavus", +} as const; +export type TavusVoiceProvider = (typeof TavusVoiceProvider)[keyof typeof TavusVoiceProvider]; diff --git a/src/api/types/TavusVoiceVoiceId.ts b/src/api/types/TavusVoiceVoiceId.ts index 5da498c8..1a8d8a3c 100644 --- a/src/api/types/TavusVoiceVoiceId.ts +++ b/src/api/types/TavusVoiceVoiceId.ts @@ -1,8 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; /** * This is the provider-specific ID that will be used. */ -export type TavusVoiceVoiceId = "r52da2535a" | string; +export type TavusVoiceVoiceId = Vapi.TavusVoiceVoiceIdZero | string; diff --git a/src/api/types/TavusVoiceVoiceIdZero.ts b/src/api/types/TavusVoiceVoiceIdZero.ts new file mode 100644 index 00000000..0acf20f4 --- /dev/null +++ b/src/api/types/TavusVoiceVoiceIdZero.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TavusVoiceVoiceIdZero = { + R52Da2535A: "r52da2535a", +} as const; +export type TavusVoiceVoiceIdZero = (typeof TavusVoiceVoiceIdZero)[keyof typeof TavusVoiceVoiceIdZero]; diff --git a/src/api/types/TelnyxPhoneNumber.ts b/src/api/types/TelnyxPhoneNumber.ts index aff42724..47e80c2d 100644 --- a/src/api/types/TelnyxPhoneNumber.ts +++ b/src/api/types/TelnyxPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TelnyxPhoneNumber { /** diff --git a/src/api/types/TelnyxPhoneNumberFallbackDestination.ts b/src/api/types/TelnyxPhoneNumberFallbackDestination.ts index 5f5d89b8..84fba19a 100644 --- a/src/api/types/TelnyxPhoneNumberFallbackDestination.ts +++ b/src/api/types/TelnyxPhoneNumberFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/TelnyxPhoneNumberHooksItem.ts b/src/api/types/TelnyxPhoneNumberHooksItem.ts index 40e1ea7d..d61e26f8 100644 --- a/src/api/types/TelnyxPhoneNumberHooksItem.ts +++ b/src/api/types/TelnyxPhoneNumberHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TelnyxPhoneNumberHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/TelnyxPhoneNumberStatus.ts b/src/api/types/TelnyxPhoneNumberStatus.ts index e4c3a5b7..687900f0 100644 --- a/src/api/types/TelnyxPhoneNumberStatus.ts +++ b/src/api/types/TelnyxPhoneNumberStatus.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the phone number. - */ -export type TelnyxPhoneNumberStatus = "active" | "activating" | "blocked"; +/** This is the status of the phone number. */ export const TelnyxPhoneNumberStatus = { Active: "active", Activating: "activating", Blocked: "blocked", } as const; +export type TelnyxPhoneNumberStatus = (typeof TelnyxPhoneNumberStatus)[keyof typeof TelnyxPhoneNumberStatus]; diff --git a/src/api/types/Template.ts b/src/api/types/Template.ts index a1df915c..175e630f 100644 --- a/src/api/types/Template.ts +++ b/src/api/types/Template.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Template { details?: Vapi.TemplateDetails; providerDetails?: Vapi.TemplateProviderDetails; metadata?: Vapi.ToolTemplateMetadata; visibility?: Vapi.TemplateVisibility; - type: "tool"; + type: Vapi.TemplateType; /** The name of the template. This is just for your own reference. */ name?: string; provider?: Vapi.TemplateProvider; diff --git a/src/api/types/TemplateDetails.ts b/src/api/types/TemplateDetails.ts index 0c0b832d..2efca96e 100644 --- a/src/api/types/TemplateDetails.ts +++ b/src/api/types/TemplateDetails.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TemplateDetails = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/TemplateProvider.ts b/src/api/types/TemplateProvider.ts index 17844c7f..2f82a068 100644 --- a/src/api/types/TemplateProvider.ts +++ b/src/api/types/TemplateProvider.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type TemplateProvider = "make" | "gohighlevel" | "function"; export const TemplateProvider = { Make: "make", Gohighlevel: "gohighlevel", Function: "function", } as const; +export type TemplateProvider = (typeof TemplateProvider)[keyof typeof TemplateProvider]; diff --git a/src/api/types/TemplateProviderDetails.ts b/src/api/types/TemplateProviderDetails.ts index 2c3b9ec2..c864d172 100644 --- a/src/api/types/TemplateProviderDetails.ts +++ b/src/api/types/TemplateProviderDetails.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TemplateProviderDetails = | Vapi.MakeToolProviderDetails diff --git a/src/api/types/TemplateType.ts b/src/api/types/TemplateType.ts new file mode 100644 index 00000000..7a8038ac --- /dev/null +++ b/src/api/types/TemplateType.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TemplateType = { + Tool: "tool", +} as const; +export type TemplateType = (typeof TemplateType)[keyof typeof TemplateType]; diff --git a/src/api/types/TemplateVisibility.ts b/src/api/types/TemplateVisibility.ts index b21b5ad0..024c93e0 100644 --- a/src/api/types/TemplateVisibility.ts +++ b/src/api/types/TemplateVisibility.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type TemplateVisibility = "public" | "private"; export const TemplateVisibility = { Public: "public", Private: "private", } as const; +export type TemplateVisibility = (typeof TemplateVisibility)[keyof typeof TemplateVisibility]; diff --git a/src/api/types/TestSuite.ts b/src/api/types/TestSuite.ts index f735af7b..486edfcf 100644 --- a/src/api/types/TestSuite.ts +++ b/src/api/types/TestSuite.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuite { /** This is the unique identifier for the test suite. */ diff --git a/src/api/types/TestSuitePhoneNumber.ts b/src/api/types/TestSuitePhoneNumber.ts index 19ee84fa..f17289f8 100644 --- a/src/api/types/TestSuitePhoneNumber.ts +++ b/src/api/types/TestSuitePhoneNumber.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface TestSuitePhoneNumber { /** This is the provider of the phone number. */ - provider: "test-suite"; + provider: Vapi.TestSuitePhoneNumberProvider; /** This is the phone number that is being tested. */ number: string; } diff --git a/src/api/types/TestSuitePhoneNumberProvider.ts b/src/api/types/TestSuitePhoneNumberProvider.ts new file mode 100644 index 00000000..2efc90dd --- /dev/null +++ b/src/api/types/TestSuitePhoneNumberProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the phone number. */ +export const TestSuitePhoneNumberProvider = { + TestSuite: "test-suite", +} as const; +export type TestSuitePhoneNumberProvider = + (typeof TestSuitePhoneNumberProvider)[keyof typeof TestSuitePhoneNumberProvider]; diff --git a/src/api/types/TestSuiteRun.ts b/src/api/types/TestSuiteRun.ts index c24610b3..293c6139 100644 --- a/src/api/types/TestSuiteRun.ts +++ b/src/api/types/TestSuiteRun.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteRun { /** This is the current status of the test suite run. */ diff --git a/src/api/types/TestSuiteRunScorerAi.ts b/src/api/types/TestSuiteRunScorerAi.ts index 3299e5a0..7453248e 100644 --- a/src/api/types/TestSuiteRunScorerAi.ts +++ b/src/api/types/TestSuiteRunScorerAi.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteRunScorerAi { /** This is the type of the scorer, which must be AI. */ - type: "ai"; + type: Vapi.TestSuiteRunScorerAiType; /** This is the result of the test suite. */ result: Vapi.TestSuiteRunScorerAiResult; /** This is the reasoning provided by the AI scorer. */ diff --git a/src/api/types/TestSuiteRunScorerAiResult.ts b/src/api/types/TestSuiteRunScorerAiResult.ts index 4705489d..7987f2a8 100644 --- a/src/api/types/TestSuiteRunScorerAiResult.ts +++ b/src/api/types/TestSuiteRunScorerAiResult.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the result of the test suite. - */ -export type TestSuiteRunScorerAiResult = "pass" | "fail"; +/** This is the result of the test suite. */ export const TestSuiteRunScorerAiResult = { Pass: "pass", Fail: "fail", } as const; +export type TestSuiteRunScorerAiResult = (typeof TestSuiteRunScorerAiResult)[keyof typeof TestSuiteRunScorerAiResult]; diff --git a/src/api/types/TestSuiteRunScorerAiType.ts b/src/api/types/TestSuiteRunScorerAiType.ts new file mode 100644 index 00000000..4383fc43 --- /dev/null +++ b/src/api/types/TestSuiteRunScorerAiType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the scorer, which must be AI. */ +export const TestSuiteRunScorerAiType = { + Ai: "ai", +} as const; +export type TestSuiteRunScorerAiType = (typeof TestSuiteRunScorerAiType)[keyof typeof TestSuiteRunScorerAiType]; diff --git a/src/api/types/TestSuiteRunStatus.ts b/src/api/types/TestSuiteRunStatus.ts index d647ca85..50d24f85 100644 --- a/src/api/types/TestSuiteRunStatus.ts +++ b/src/api/types/TestSuiteRunStatus.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the current status of the test suite run. - */ -export type TestSuiteRunStatus = "queued" | "in-progress" | "completed" | "failed"; +/** This is the current status of the test suite run. */ export const TestSuiteRunStatus = { Queued: "queued", InProgress: "in-progress", Completed: "completed", Failed: "failed", } as const; +export type TestSuiteRunStatus = (typeof TestSuiteRunStatus)[keyof typeof TestSuiteRunStatus]; diff --git a/src/api/types/TestSuiteRunTestAttempt.ts b/src/api/types/TestSuiteRunTestAttempt.ts index 03bcef89..f7a7b7de 100644 --- a/src/api/types/TestSuiteRunTestAttempt.ts +++ b/src/api/types/TestSuiteRunTestAttempt.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteRunTestAttempt { /** These are the results of the scorers used to evaluate the test attempt. */ diff --git a/src/api/types/TestSuiteRunTestAttemptCall.ts b/src/api/types/TestSuiteRunTestAttemptCall.ts index ac20bae2..7c2900e1 100644 --- a/src/api/types/TestSuiteRunTestAttemptCall.ts +++ b/src/api/types/TestSuiteRunTestAttemptCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteRunTestAttemptCall { /** This is the artifact of the call. */ diff --git a/src/api/types/TestSuiteRunTestAttemptMetadata.ts b/src/api/types/TestSuiteRunTestAttemptMetadata.ts index b90f202a..a6352cb3 100644 --- a/src/api/types/TestSuiteRunTestAttemptMetadata.ts +++ b/src/api/types/TestSuiteRunTestAttemptMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TestSuiteRunTestAttemptMetadata { /** This is the session ID for the test attempt. */ diff --git a/src/api/types/TestSuiteRunTestResult.ts b/src/api/types/TestSuiteRunTestResult.ts index 94bab6b4..ca8fbf1f 100644 --- a/src/api/types/TestSuiteRunTestResult.ts +++ b/src/api/types/TestSuiteRunTestResult.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteRunTestResult { /** This is the test that was run. */ diff --git a/src/api/types/TestSuiteRunsPaginatedResponse.ts b/src/api/types/TestSuiteRunsPaginatedResponse.ts index 6a52000f..0cf080ae 100644 --- a/src/api/types/TestSuiteRunsPaginatedResponse.ts +++ b/src/api/types/TestSuiteRunsPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteRunsPaginatedResponse { results: Vapi.TestSuiteRun[]; diff --git a/src/api/types/TestSuiteTestChat.ts b/src/api/types/TestSuiteTestChat.ts index c2b3580a..115ade1c 100644 --- a/src/api/types/TestSuiteTestChat.ts +++ b/src/api/types/TestSuiteTestChat.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteTestChat { /** These are the scorers used to evaluate the test. */ scorers: Vapi.TestSuiteTestScorerAi[]; /** This is the type of the test, which must be chat. */ - type: "chat"; + type: Vapi.TestSuiteTestChatType; /** This is the unique identifier for the test. */ id: string; /** This is the unique identifier for the test suite this test belongs to. */ diff --git a/src/api/types/TestSuiteTestChatType.ts b/src/api/types/TestSuiteTestChatType.ts new file mode 100644 index 00000000..e37cd116 --- /dev/null +++ b/src/api/types/TestSuiteTestChatType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the test, which must be chat. */ +export const TestSuiteTestChatType = { + Chat: "chat", +} as const; +export type TestSuiteTestChatType = (typeof TestSuiteTestChatType)[keyof typeof TestSuiteTestChatType]; diff --git a/src/api/types/TestSuiteTestScorerAi.ts b/src/api/types/TestSuiteTestScorerAi.ts index c712e4bc..1766494d 100644 --- a/src/api/types/TestSuiteTestScorerAi.ts +++ b/src/api/types/TestSuiteTestScorerAi.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface TestSuiteTestScorerAi { /** This is the type of the scorer, which must be AI. */ - type: "ai"; + type: Vapi.TestSuiteTestScorerAiType; /** This is the rubric used by the AI scorer. */ rubric: string; } diff --git a/src/api/types/TestSuiteTestScorerAiType.ts b/src/api/types/TestSuiteTestScorerAiType.ts new file mode 100644 index 00000000..505ca800 --- /dev/null +++ b/src/api/types/TestSuiteTestScorerAiType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the scorer, which must be AI. */ +export const TestSuiteTestScorerAiType = { + Ai: "ai", +} as const; +export type TestSuiteTestScorerAiType = (typeof TestSuiteTestScorerAiType)[keyof typeof TestSuiteTestScorerAiType]; diff --git a/src/api/types/TestSuiteTestVoice.ts b/src/api/types/TestSuiteTestVoice.ts index d1a105a3..5c8394a1 100644 --- a/src/api/types/TestSuiteTestVoice.ts +++ b/src/api/types/TestSuiteTestVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteTestVoice { /** These are the scorers used to evaluate the test. */ scorers: Vapi.TestSuiteTestScorerAi[]; /** This is the type of the test, which must be voice. */ - type: "voice"; + type: Vapi.TestSuiteTestVoiceType; /** This is the unique identifier for the test. */ id: string; /** This is the unique identifier for the test suite this test belongs to. */ diff --git a/src/api/types/TestSuiteTestVoiceType.ts b/src/api/types/TestSuiteTestVoiceType.ts new file mode 100644 index 00000000..7e686f05 --- /dev/null +++ b/src/api/types/TestSuiteTestVoiceType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the test, which must be voice. */ +export const TestSuiteTestVoiceType = { + Voice: "voice", +} as const; +export type TestSuiteTestVoiceType = (typeof TestSuiteTestVoiceType)[keyof typeof TestSuiteTestVoiceType]; diff --git a/src/api/types/TestSuiteTestsPaginatedResponse.ts b/src/api/types/TestSuiteTestsPaginatedResponse.ts index 840cee23..7153159c 100644 --- a/src/api/types/TestSuiteTestsPaginatedResponse.ts +++ b/src/api/types/TestSuiteTestsPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuiteTestsPaginatedResponse { /** A list of test suite tests. */ diff --git a/src/api/types/TestSuiteTestsPaginatedResponseResultsItem.ts b/src/api/types/TestSuiteTestsPaginatedResponseResultsItem.ts index 1b2bf77d..a6f92023 100644 --- a/src/api/types/TestSuiteTestsPaginatedResponseResultsItem.ts +++ b/src/api/types/TestSuiteTestsPaginatedResponseResultsItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TestSuiteTestsPaginatedResponseResultsItem = Vapi.TestSuiteTestVoice | Vapi.TestSuiteTestChat; diff --git a/src/api/types/TestSuitesPaginatedResponse.ts b/src/api/types/TestSuitesPaginatedResponse.ts index facbbfb6..cd2dddce 100644 --- a/src/api/types/TestSuitesPaginatedResponse.ts +++ b/src/api/types/TestSuitesPaginatedResponse.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TestSuitesPaginatedResponse { results: Vapi.TestSuite[]; diff --git a/src/api/types/TesterPlan.ts b/src/api/types/TesterPlan.ts index 4aadc1f0..6b148021 100644 --- a/src/api/types/TesterPlan.ts +++ b/src/api/types/TesterPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TesterPlan { /** diff --git a/src/api/types/TextContent.ts b/src/api/types/TextContent.ts index d6dd0498..6a4f7bc1 100644 --- a/src/api/types/TextContent.ts +++ b/src/api/types/TextContent.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TextContent { - type: "text"; + type: Vapi.TextContentType; text: string; language: Vapi.TextContentLanguage; } diff --git a/src/api/types/TextContentLanguage.ts b/src/api/types/TextContentLanguage.ts index fde9d23a..51352c70 100644 --- a/src/api/types/TextContentLanguage.ts +++ b/src/api/types/TextContentLanguage.ts @@ -1,193 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type TextContentLanguage = - | "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"; export const TextContentLanguage = { Aa: "aa", Ab: "ab", @@ -375,3 +187,4 @@ export const TextContentLanguage = { Zh: "zh", Zu: "zu", } as const; +export type TextContentLanguage = (typeof TextContentLanguage)[keyof typeof TextContentLanguage]; diff --git a/src/api/types/TextContentType.ts b/src/api/types/TextContentType.ts new file mode 100644 index 00000000..55c03733 --- /dev/null +++ b/src/api/types/TextContentType.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TextContentType = { + Text: "text", +} as const; +export type TextContentType = (typeof TextContentType)[keyof typeof TextContentType]; diff --git a/src/api/types/TextEditorTool.ts b/src/api/types/TextEditorTool.ts index c2f1e519..3bf20873 100644 --- a/src/api/types/TextEditorTool.ts +++ b/src/api/types/TextEditorTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TextEditorTool { /** @@ -13,7 +11,7 @@ export interface TextEditorTool { messages?: Vapi.TextEditorToolMessagesItem[]; type: "textEditor"; /** The sub type of tool. */ - subType: "text_editor_20241022"; + subType: Vapi.TextEditorToolSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -115,5 +113,5 @@ export interface TextEditorTool { */ rejectionPlan?: Vapi.ToolRejectionPlan; /** The name of the tool, fixed to 'str_replace_editor' */ - name: "str_replace_editor"; + name: Vapi.TextEditorToolName; } diff --git a/src/api/types/TextEditorToolMessagesItem.ts b/src/api/types/TextEditorToolMessagesItem.ts index 9feb8364..cffd69d4 100644 --- a/src/api/types/TextEditorToolMessagesItem.ts +++ b/src/api/types/TextEditorToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TextEditorToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/TextEditorToolName.ts b/src/api/types/TextEditorToolName.ts new file mode 100644 index 00000000..79485eab --- /dev/null +++ b/src/api/types/TextEditorToolName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'str_replace_editor' */ +export const TextEditorToolName = { + StrReplaceEditor: "str_replace_editor", +} as const; +export type TextEditorToolName = (typeof TextEditorToolName)[keyof typeof TextEditorToolName]; diff --git a/src/api/types/TextEditorToolSubType.ts b/src/api/types/TextEditorToolSubType.ts new file mode 100644 index 00000000..d56c3ec1 --- /dev/null +++ b/src/api/types/TextEditorToolSubType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const TextEditorToolSubType = { + TextEditor20241022: "text_editor_20241022", +} as const; +export type TextEditorToolSubType = (typeof TextEditorToolSubType)[keyof typeof TextEditorToolSubType]; diff --git a/src/api/types/TextEditorToolWithToolCall.ts b/src/api/types/TextEditorToolWithToolCall.ts index 5e111e59..e93a6cf3 100644 --- a/src/api/types/TextEditorToolWithToolCall.ts +++ b/src/api/types/TextEditorToolWithToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TextEditorToolWithToolCall { /** @@ -12,9 +10,9 @@ export interface TextEditorToolWithToolCall { */ messages?: Vapi.TextEditorToolWithToolCallMessagesItem[]; /** The type of tool. "textEditor" for Text Editor tool. */ - type: "textEditor"; + type: Vapi.TextEditorToolWithToolCallType; /** The sub type of tool. */ - subType: "text_editor_20241022"; + subType: Vapi.TextEditorToolWithToolCallSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -28,7 +26,7 @@ export interface TextEditorToolWithToolCall { server?: Vapi.Server; toolCall: Vapi.ToolCall; /** The name of the tool, fixed to 'str_replace_editor' */ - name: "str_replace_editor"; + name: Vapi.TextEditorToolWithToolCallName; /** * This is the plan to reject a tool call based on the conversation state. * diff --git a/src/api/types/TextEditorToolWithToolCallMessagesItem.ts b/src/api/types/TextEditorToolWithToolCallMessagesItem.ts index 219da19f..516ae20e 100644 --- a/src/api/types/TextEditorToolWithToolCallMessagesItem.ts +++ b/src/api/types/TextEditorToolWithToolCallMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TextEditorToolWithToolCallMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/TextEditorToolWithToolCallName.ts b/src/api/types/TextEditorToolWithToolCallName.ts new file mode 100644 index 00000000..9f7aa9d4 --- /dev/null +++ b/src/api/types/TextEditorToolWithToolCallName.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'str_replace_editor' */ +export const TextEditorToolWithToolCallName = { + StrReplaceEditor: "str_replace_editor", +} as const; +export type TextEditorToolWithToolCallName = + (typeof TextEditorToolWithToolCallName)[keyof typeof TextEditorToolWithToolCallName]; diff --git a/src/api/types/TextEditorToolWithToolCallSubType.ts b/src/api/types/TextEditorToolWithToolCallSubType.ts new file mode 100644 index 00000000..a0978b4d --- /dev/null +++ b/src/api/types/TextEditorToolWithToolCallSubType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const TextEditorToolWithToolCallSubType = { + TextEditor20241022: "text_editor_20241022", +} as const; +export type TextEditorToolWithToolCallSubType = + (typeof TextEditorToolWithToolCallSubType)[keyof typeof TextEditorToolWithToolCallSubType]; diff --git a/src/api/types/TextEditorToolWithToolCallType.ts b/src/api/types/TextEditorToolWithToolCallType.ts new file mode 100644 index 00000000..f2718c8b --- /dev/null +++ b/src/api/types/TextEditorToolWithToolCallType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of tool. "textEditor" for Text Editor tool. */ +export const TextEditorToolWithToolCallType = { + TextEditor: "textEditor", +} as const; +export type TextEditorToolWithToolCallType = + (typeof TextEditorToolWithToolCallType)[keyof typeof TextEditorToolWithToolCallType]; diff --git a/src/api/types/TextInsight.ts b/src/api/types/TextInsight.ts new file mode 100644 index 00000000..64c24572 --- /dev/null +++ b/src/api/types/TextInsight.ts @@ -0,0 +1,41 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface TextInsight { + /** This is the name of the Insight. */ + name?: string; + type: "text"; + /** + * 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. + */ + formula?: Record; + timeRange?: Vapi.InsightTimeRange; + /** + * 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 + */ + queries: Vapi.TextInsightQueriesItem[]; + /** This is the unique identifier for the Insight. */ + id: string; + /** This is the unique identifier for the org that this Insight belongs to. */ + orgId: string; + /** This is the ISO 8601 date-time string of when the Insight was created. */ + createdAt: string; + /** This is the ISO 8601 date-time string of when the Insight was last updated. */ + updatedAt: string; +} diff --git a/src/api/types/TextInsightFromCallTable.ts b/src/api/types/TextInsightFromCallTable.ts new file mode 100644 index 00000000..6da0a298 --- /dev/null +++ b/src/api/types/TextInsightFromCallTable.ts @@ -0,0 +1,37 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface TextInsightFromCallTable { + /** This is the name of the Insight. */ + name?: string; + /** + * This is the type of the Insight. + * It is required to be `text` to create a text insight. + */ + type: Vapi.TextInsightFromCallTableType; + /** + * 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. + */ + formula?: Record; + timeRange?: Vapi.InsightTimeRange; + /** + * 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 + */ + queries: Vapi.TextInsightFromCallTableQueriesItem[]; +} diff --git a/src/api/types/TextInsightFromCallTableQueriesItem.ts b/src/api/types/TextInsightFromCallTableQueriesItem.ts new file mode 100644 index 00000000..09c134de --- /dev/null +++ b/src/api/types/TextInsightFromCallTableQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type TextInsightFromCallTableQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/TextInsightFromCallTableType.ts b/src/api/types/TextInsightFromCallTableType.ts new file mode 100644 index 00000000..095d7205 --- /dev/null +++ b/src/api/types/TextInsightFromCallTableType.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the type of the Insight. + * It is required to be `text` to create a text insight. + */ +export const TextInsightFromCallTableType = { + Text: "text", +} as const; +export type TextInsightFromCallTableType = + (typeof TextInsightFromCallTableType)[keyof typeof TextInsightFromCallTableType]; diff --git a/src/api/types/TextInsightQueriesItem.ts b/src/api/types/TextInsightQueriesItem.ts new file mode 100644 index 00000000..7b669ff0 --- /dev/null +++ b/src/api/types/TextInsightQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type TextInsightQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/TimeRange.ts b/src/api/types/TimeRange.ts index b7fdd0ce..91539272 100644 --- a/src/api/types/TimeRange.ts +++ b/src/api/types/TimeRange.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TimeRange { /** diff --git a/src/api/types/TimeRangeStep.ts b/src/api/types/TimeRangeStep.ts index c9be7e5c..ace5c742 100644 --- a/src/api/types/TimeRangeStep.ts +++ b/src/api/types/TimeRangeStep.ts @@ -1,24 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the time step for aggregations. * * If not provided, defaults to returning for the entire time range. */ -export type TimeRangeStep = - | "second" - | "minute" - | "hour" - | "day" - | "week" - | "month" - | "quarter" - | "year" - | "decade" - | "century" - | "millennium"; export const TimeRangeStep = { Second: "second", Minute: "minute", @@ -32,3 +18,4 @@ export const TimeRangeStep = { Century: "century", Millennium: "millennium", } as const; +export type TimeRangeStep = (typeof TimeRangeStep)[keyof typeof TimeRangeStep]; diff --git a/src/api/types/TogetherAiCredential.ts b/src/api/types/TogetherAiCredential.ts index 4745d2ed..d3e4e2d2 100644 --- a/src/api/types/TogetherAiCredential.ts +++ b/src/api/types/TogetherAiCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface TogetherAiCredential { - provider: "together-ai"; + provider: Vapi.TogetherAiCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/TogetherAiCredentialProvider.ts b/src/api/types/TogetherAiCredentialProvider.ts new file mode 100644 index 00000000..eb197e46 --- /dev/null +++ b/src/api/types/TogetherAiCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TogetherAiCredentialProvider = { + TogetherAi: "together-ai", +} as const; +export type TogetherAiCredentialProvider = + (typeof TogetherAiCredentialProvider)[keyof typeof TogetherAiCredentialProvider]; diff --git a/src/api/types/TogetherAiModel.ts b/src/api/types/TogetherAiModel.ts index 4e9bf23a..47056167 100644 --- a/src/api/types/TogetherAiModel.ts +++ b/src/api/types/TogetherAiModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TogetherAiModel { /** This is the starting state for the conversation. */ @@ -21,7 +19,7 @@ export interface TogetherAiModel { toolIds?: string[]; /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; - provider: "together-ai"; + provider: Vapi.TogetherAiModelProvider; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: string; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ diff --git a/src/api/types/TogetherAiModelProvider.ts b/src/api/types/TogetherAiModelProvider.ts new file mode 100644 index 00000000..bc714b2f --- /dev/null +++ b/src/api/types/TogetherAiModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TogetherAiModelProvider = { + TogetherAi: "together-ai", +} as const; +export type TogetherAiModelProvider = (typeof TogetherAiModelProvider)[keyof typeof TogetherAiModelProvider]; diff --git a/src/api/types/TogetherAiModelToolsItem.ts b/src/api/types/TogetherAiModelToolsItem.ts index 3dfff10c..1f0522b6 100644 --- a/src/api/types/TogetherAiModelToolsItem.ts +++ b/src/api/types/TogetherAiModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TogetherAiModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/Token.ts b/src/api/types/Token.ts index ee6c9684..0e2d7e16 100644 --- a/src/api/types/Token.ts +++ b/src/api/types/Token.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Token { /** This is the tag for the token. It represents its scope. */ diff --git a/src/api/types/TokenRestrictions.ts b/src/api/types/TokenRestrictions.ts index 1617ca99..53db9e6c 100644 --- a/src/api/types/TokenRestrictions.ts +++ b/src/api/types/TokenRestrictions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TokenRestrictions { /** This determines whether the token is enabled or disabled. Default is true, it's enabled. */ diff --git a/src/api/types/TokenTag.ts b/src/api/types/TokenTag.ts index 96ca53f2..c6669d19 100644 --- a/src/api/types/TokenTag.ts +++ b/src/api/types/TokenTag.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the tag for the token. It represents its scope. - */ -export type TokenTag = "private" | "public"; +/** This is the tag for the token. It represents its scope. */ export const TokenTag = { Private: "private", Public: "public", } as const; +export type TokenTag = (typeof TokenTag)[keyof typeof TokenTag]; diff --git a/src/api/types/ToolCall.ts b/src/api/types/ToolCall.ts index fd5527e0..e12999c6 100644 --- a/src/api/types/ToolCall.ts +++ b/src/api/types/ToolCall.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolCall { /** This is the ID of the tool call */ diff --git a/src/api/types/ToolCallFunction.ts b/src/api/types/ToolCallFunction.ts index 425765d1..e1ef5e1f 100644 --- a/src/api/types/ToolCallFunction.ts +++ b/src/api/types/ToolCallFunction.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ToolCallFunction { /** This is the arguments to call the function with */ diff --git a/src/api/types/ToolCallHookAction.ts b/src/api/types/ToolCallHookAction.ts index d1a360c1..f88b9140 100644 --- a/src/api/types/ToolCallHookAction.ts +++ b/src/api/types/ToolCallHookAction.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolCallHookAction { /** This is the type of action - must be "tool" */ - type: "tool"; + type: Vapi.ToolCallHookActionType; /** This is the tool to call. To use an existing tool, send `toolId` instead. */ tool?: Vapi.ToolCallHookActionTool; /** This is the tool to call. To use a transient tool, send `tool` instead. */ diff --git a/src/api/types/ToolCallHookActionTool.ts b/src/api/types/ToolCallHookActionTool.ts index 3aefd667..c9b3811d 100644 --- a/src/api/types/ToolCallHookActionTool.ts +++ b/src/api/types/ToolCallHookActionTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the tool to call. To use an existing tool, send `toolId` instead. diff --git a/src/api/types/ToolCallHookActionType.ts b/src/api/types/ToolCallHookActionType.ts new file mode 100644 index 00000000..56e01d97 --- /dev/null +++ b/src/api/types/ToolCallHookActionType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of action - must be "tool" */ +export const ToolCallHookActionType = { + Tool: "tool", +} as const; +export type ToolCallHookActionType = (typeof ToolCallHookActionType)[keyof typeof ToolCallHookActionType]; diff --git a/src/api/types/ToolCallMessage.ts b/src/api/types/ToolCallMessage.ts index d5a7e094..1675f26c 100644 --- a/src/api/types/ToolCallMessage.ts +++ b/src/api/types/ToolCallMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ToolCallMessage { /** The role of the tool call in the conversation. */ diff --git a/src/api/types/ToolCallResult.ts b/src/api/types/ToolCallResult.ts index 757860cd..0f30ca3d 100644 --- a/src/api/types/ToolCallResult.ts +++ b/src/api/types/ToolCallResult.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolCallResult { /** diff --git a/src/api/types/ToolCallResultMessage.ts b/src/api/types/ToolCallResultMessage.ts index 921b6d81..6eb80c91 100644 --- a/src/api/types/ToolCallResultMessage.ts +++ b/src/api/types/ToolCallResultMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ToolCallResultMessage { /** The role of the tool call result in the conversation. */ diff --git a/src/api/types/ToolMessage.ts b/src/api/types/ToolMessage.ts index a7358732..60268c4a 100644 --- a/src/api/types/ToolMessage.ts +++ b/src/api/types/ToolMessage.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface ToolMessage { /** This is the role of the message author */ - role: "tool"; + role: Vapi.ToolMessageRole; /** This is the content of the tool message */ content: string; /** This is the ID of the tool call this message is responding to */ diff --git a/src/api/types/ToolMessageComplete.ts b/src/api/types/ToolMessageComplete.ts index a1497d4f..2506f71e 100644 --- a/src/api/types/ToolMessageComplete.ts +++ b/src/api/types/ToolMessageComplete.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolMessageComplete { /** @@ -24,7 +22,7 @@ export interface ToolMessageComplete { * * 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. */ - type: "request-complete"; + type: Vapi.ToolMessageCompleteType; /** * This is optional and defaults to "assistant". * diff --git a/src/api/types/ToolMessageCompleteRole.ts b/src/api/types/ToolMessageCompleteRole.ts index 45f84334..28ecdbde 100644 --- a/src/api/types/ToolMessageCompleteRole.ts +++ b/src/api/types/ToolMessageCompleteRole.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is optional and defaults to "assistant". @@ -21,8 +19,8 @@ * ---> model generates response which is spoken * This is useful when you want to provide a hint to the model about what to say next. */ -export type ToolMessageCompleteRole = "assistant" | "system"; export const ToolMessageCompleteRole = { Assistant: "assistant", System: "system", } as const; +export type ToolMessageCompleteRole = (typeof ToolMessageCompleteRole)[keyof typeof ToolMessageCompleteRole]; diff --git a/src/api/types/ToolMessageCompleteType.ts b/src/api/types/ToolMessageCompleteType.ts new file mode 100644 index 00000000..5051ecdd --- /dev/null +++ b/src/api/types/ToolMessageCompleteType.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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. + * + * If this message is not provided, the model will be requested to respond. + * + * 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. + */ +export const ToolMessageCompleteType = { + RequestComplete: "request-complete", +} as const; +export type ToolMessageCompleteType = (typeof ToolMessageCompleteType)[keyof typeof ToolMessageCompleteType]; diff --git a/src/api/types/ToolMessageDelayed.ts b/src/api/types/ToolMessageDelayed.ts index 9959439f..4cefdf4b 100644 --- a/src/api/types/ToolMessageDelayed.ts +++ b/src/api/types/ToolMessageDelayed.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolMessageDelayed { /** @@ -24,7 +22,7 @@ export interface ToolMessageDelayed { * * This message is never triggered for async tool calls. */ - type: "request-response-delayed"; + type: Vapi.ToolMessageDelayedType; /** The number of milliseconds to wait for the server response before saying this message. */ timingMilliseconds?: number; /** This is the content that the assistant says when this message is triggered. */ diff --git a/src/api/types/ToolMessageDelayedType.ts b/src/api/types/ToolMessageDelayedType.ts new file mode 100644 index 00000000..4c0b9246 --- /dev/null +++ b/src/api/types/ToolMessageDelayedType.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This message is triggered when the tool call is delayed. + * + * There are the two things that can trigger this message: + * 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`. + * + * This message is never triggered for async tool calls. + */ +export const ToolMessageDelayedType = { + RequestResponseDelayed: "request-response-delayed", +} as const; +export type ToolMessageDelayedType = (typeof ToolMessageDelayedType)[keyof typeof ToolMessageDelayedType]; diff --git a/src/api/types/ToolMessageFailed.ts b/src/api/types/ToolMessageFailed.ts index a2fee927..ab209b7c 100644 --- a/src/api/types/ToolMessageFailed.ts +++ b/src/api/types/ToolMessageFailed.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolMessageFailed { /** @@ -24,7 +22,7 @@ export interface ToolMessageFailed { * * 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. */ - type: "request-failed"; + type: Vapi.ToolMessageFailedType; /** * This is an optional boolean that if true, the call will end after the message is spoken. Default is false. * diff --git a/src/api/types/ToolMessageFailedType.ts b/src/api/types/ToolMessageFailedType.ts new file mode 100644 index 00000000..eaf5aca1 --- /dev/null +++ b/src/api/types/ToolMessageFailedType.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This message is triggered when the tool call fails. + * + * This message is never triggered for async tool calls. + * + * If this message is not provided, the model will be requested to respond. + * + * 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. + */ +export const ToolMessageFailedType = { + RequestFailed: "request-failed", +} as const; +export type ToolMessageFailedType = (typeof ToolMessageFailedType)[keyof typeof ToolMessageFailedType]; diff --git a/src/api/types/ToolMessageRole.ts b/src/api/types/ToolMessageRole.ts new file mode 100644 index 00000000..9ecb3d1f --- /dev/null +++ b/src/api/types/ToolMessageRole.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the role of the message author */ +export const ToolMessageRole = { + Tool: "tool", +} as const; +export type ToolMessageRole = (typeof ToolMessageRole)[keyof typeof ToolMessageRole]; diff --git a/src/api/types/ToolMessageStart.ts b/src/api/types/ToolMessageStart.ts index 1fcd7318..ac823e03 100644 --- a/src/api/types/ToolMessageStart.ts +++ b/src/api/types/ToolMessageStart.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolMessageStart { /** @@ -22,7 +20,7 @@ export interface ToolMessageStart { * * 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. */ - type: "request-start"; + type: Vapi.ToolMessageStartType; /** * This is an optional boolean that if true, the tool call will only trigger after the message is spoken. Default is false. * diff --git a/src/api/types/ToolMessageStartType.ts b/src/api/types/ToolMessageStartType.ts new file mode 100644 index 00000000..555cfa2e --- /dev/null +++ b/src/api/types/ToolMessageStartType.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This message is triggered when the tool call starts. + * + * This message is never triggered for async tools. + * + * 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. + */ +export const ToolMessageStartType = { + RequestStart: "request-start", +} as const; +export type ToolMessageStartType = (typeof ToolMessageStartType)[keyof typeof ToolMessageStartType]; diff --git a/src/api/types/ToolNode.ts b/src/api/types/ToolNode.ts index 74944feb..4969d79e 100644 --- a/src/api/types/ToolNode.ts +++ b/src/api/types/ToolNode.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolNode { /** @@ -15,7 +13,7 @@ export interface ToolNode { * - Server returns a response * - Workflow continues with the response */ - type: "tool"; + type: Vapi.ToolNodeType; /** This is the tool to call. To use an existing tool, send `toolId` instead. */ tool?: Vapi.ToolNodeTool; /** This is the tool to call. To use a transient tool, send `tool` instead. */ diff --git a/src/api/types/ToolNodeTool.ts b/src/api/types/ToolNodeTool.ts index a525029e..bcd382d2 100644 --- a/src/api/types/ToolNodeTool.ts +++ b/src/api/types/ToolNodeTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the tool to call. To use an existing tool, send `toolId` instead. diff --git a/src/api/types/ToolNodeType.ts b/src/api/types/ToolNodeType.ts new file mode 100644 index 00000000..acf2d96b --- /dev/null +++ b/src/api/types/ToolNodeType.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the Tool node. This can be used to call a tool in your workflow. + * + * The flow is: + * - Workflow starts the tool node + * - Model is called to extract parameters needed by the tool from the conversation history + * - Tool is called with the parameters + * - Server returns a response + * - Workflow continues with the response + */ +export const ToolNodeType = { + Tool: "tool", +} as const; +export type ToolNodeType = (typeof ToolNodeType)[keyof typeof ToolNodeType]; diff --git a/src/api/types/ToolRejectionPlan.ts b/src/api/types/ToolRejectionPlan.ts index a7e602af..dc3bc1e6 100644 --- a/src/api/types/ToolRejectionPlan.ts +++ b/src/api/types/ToolRejectionPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface ToolRejectionPlan { /** diff --git a/src/api/types/ToolRejectionPlanConditionsItem.ts b/src/api/types/ToolRejectionPlanConditionsItem.ts index dba53ca7..05d7ffd5 100644 --- a/src/api/types/ToolRejectionPlanConditionsItem.ts +++ b/src/api/types/ToolRejectionPlanConditionsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type ToolRejectionPlanConditionsItem = | Vapi.RegexCondition diff --git a/src/api/types/ToolTemplateMetadata.ts b/src/api/types/ToolTemplateMetadata.ts index 93ee11bc..08a3bbe7 100644 --- a/src/api/types/ToolTemplateMetadata.ts +++ b/src/api/types/ToolTemplateMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ToolTemplateMetadata { collectionType?: string; diff --git a/src/api/types/ToolTemplateSetup.ts b/src/api/types/ToolTemplateSetup.ts index 60167f64..ca66df16 100644 --- a/src/api/types/ToolTemplateSetup.ts +++ b/src/api/types/ToolTemplateSetup.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ToolTemplateSetup { title: string; diff --git a/src/api/types/TranscriberCost.ts b/src/api/types/TranscriberCost.ts index 64ddf9a6..64442c73 100644 --- a/src/api/types/TranscriberCost.ts +++ b/src/api/types/TranscriberCost.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface TranscriberCost { /** This is the type of cost, always 'transcriber' for this class. */ - type: "transcriber"; + type: Vapi.TranscriberCostType; /** * This is the transcriber that was used during the call. * diff --git a/src/api/types/TranscriberCostType.ts b/src/api/types/TranscriberCostType.ts new file mode 100644 index 00000000..6e180399 --- /dev/null +++ b/src/api/types/TranscriberCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'transcriber' for this class. */ +export const TranscriberCostType = { + Transcriber: "transcriber", +} as const; +export type TranscriberCostType = (typeof TranscriberCostType)[keyof typeof TranscriberCostType]; diff --git a/src/api/types/TranscriptPlan.ts b/src/api/types/TranscriptPlan.ts index abc8be9d..463a138f 100644 --- a/src/api/types/TranscriptPlan.ts +++ b/src/api/types/TranscriptPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TranscriptPlan { /** diff --git a/src/api/types/TranscriptionEndpointingPlan.ts b/src/api/types/TranscriptionEndpointingPlan.ts index a9256bab..57c03784 100644 --- a/src/api/types/TranscriptionEndpointingPlan.ts +++ b/src/api/types/TranscriptionEndpointingPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TranscriptionEndpointingPlan { /** diff --git a/src/api/types/TransferAssistant.ts b/src/api/types/TransferAssistant.ts index a65e1ffc..eeabf685 100644 --- a/src/api/types/TransferAssistant.ts +++ b/src/api/types/TransferAssistant.ts @@ -1,14 +1,16 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferAssistant { /** Optional name for the transfer assistant */ name?: string; /** Model configuration for the transfer assistant */ model: Vapi.TransferAssistantModel; + /** These are the options for the transfer assistant's voice. */ + voice?: Vapi.TransferAssistantVoice; + /** These are the options for the transfer assistant's transcriber. */ + transcriber?: Vapi.TransferAssistantTranscriber; /** * This is the first message that the transfer assistant will say. * This can also be a URL to a custom audio file. @@ -16,6 +18,11 @@ export interface TransferAssistant { * If unspecified, assistant will wait for user to speak and use the model to respond once they speak. */ firstMessage?: string; + /** + * This is the background sound in the transfer assistant 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. + */ + backgroundSound?: Vapi.TransferAssistantBackgroundSound; /** * This is the mode for the first message. Default is 'assistant-speaks-first'. * diff --git a/src/api/types/TransferAssistantBackgroundSound.ts b/src/api/types/TransferAssistantBackgroundSound.ts new file mode 100644 index 00000000..c83a1cbf --- /dev/null +++ b/src/api/types/TransferAssistantBackgroundSound.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +/** + * This is the background sound in the transfer assistant 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. + */ +export type TransferAssistantBackgroundSound = Vapi.TransferAssistantBackgroundSoundZero | string; diff --git a/src/api/types/TransferAssistantBackgroundSoundZero.ts b/src/api/types/TransferAssistantBackgroundSoundZero.ts new file mode 100644 index 00000000..9a359593 --- /dev/null +++ b/src/api/types/TransferAssistantBackgroundSoundZero.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TransferAssistantBackgroundSoundZero = { + Off: "off", + Office: "office", +} as const; +export type TransferAssistantBackgroundSoundZero = + (typeof TransferAssistantBackgroundSoundZero)[keyof typeof TransferAssistantBackgroundSoundZero]; diff --git a/src/api/types/TransferAssistantFirstMessageMode.ts b/src/api/types/TransferAssistantFirstMessageMode.ts index f1dcffec..4f467ee4 100644 --- a/src/api/types/TransferAssistantFirstMessageMode.ts +++ b/src/api/types/TransferAssistantFirstMessageMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the mode for the first message. Default is 'assistant-speaks-first'. @@ -12,12 +10,10 @@ * * @default 'assistant-speaks-first' */ -export type TransferAssistantFirstMessageMode = - | "assistant-speaks-first" - | "assistant-speaks-first-with-model-generated-message" - | "assistant-waits-for-user"; export const TransferAssistantFirstMessageMode = { AssistantSpeaksFirst: "assistant-speaks-first", AssistantSpeaksFirstWithModelGeneratedMessage: "assistant-speaks-first-with-model-generated-message", AssistantWaitsForUser: "assistant-waits-for-user", } as const; +export type TransferAssistantFirstMessageMode = + (typeof TransferAssistantFirstMessageMode)[keyof typeof TransferAssistantFirstMessageMode]; diff --git a/src/api/types/TransferAssistantHookAction.ts b/src/api/types/TransferAssistantHookAction.ts index eae49f08..90fcbad3 100644 --- a/src/api/types/TransferAssistantHookAction.ts +++ b/src/api/types/TransferAssistantHookAction.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type TransferAssistantHookAction = unknown; diff --git a/src/api/types/TransferAssistantModel.ts b/src/api/types/TransferAssistantModel.ts index c5ed9e07..2790c08b 100644 --- a/src/api/types/TransferAssistantModel.ts +++ b/src/api/types/TransferAssistantModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferAssistantModel { /** The model provider for the transfer assistant */ diff --git a/src/api/types/TransferAssistantModelProvider.ts b/src/api/types/TransferAssistantModelProvider.ts index 48579f52..dae9c096 100644 --- a/src/api/types/TransferAssistantModelProvider.ts +++ b/src/api/types/TransferAssistantModelProvider.ts @@ -1,14 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The model provider for the transfer assistant - */ -export type TransferAssistantModelProvider = "openai" | "anthropic" | "google" | "custom-llm"; +/** The model provider for the transfer assistant */ export const TransferAssistantModelProvider = { Openai: "openai", Anthropic: "anthropic", Google: "google", CustomLlm: "custom-llm", } as const; +export type TransferAssistantModelProvider = + (typeof TransferAssistantModelProvider)[keyof typeof TransferAssistantModelProvider]; diff --git a/src/api/types/TransferAssistantTranscriber.ts b/src/api/types/TransferAssistantTranscriber.ts new file mode 100644 index 00000000..f9d9f6a6 --- /dev/null +++ b/src/api/types/TransferAssistantTranscriber.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +/** + * These are the options for the transfer assistant's transcriber. + */ +export type TransferAssistantTranscriber = + | Vapi.AssemblyAiTranscriber + | Vapi.AzureSpeechTranscriber + | Vapi.CustomTranscriber + | Vapi.DeepgramTranscriber + | Vapi.ElevenLabsTranscriber + | Vapi.GladiaTranscriber + | Vapi.GoogleTranscriber + | Vapi.SpeechmaticsTranscriber + | Vapi.TalkscriberTranscriber + | Vapi.OpenAiTranscriber + | Vapi.CartesiaTranscriber; diff --git a/src/api/types/TransferAssistantVoice.ts b/src/api/types/TransferAssistantVoice.ts new file mode 100644 index 00000000..c53117e9 --- /dev/null +++ b/src/api/types/TransferAssistantVoice.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +/** + * These are the options for the transfer assistant's voice. + */ +export type TransferAssistantVoice = + | Vapi.AzureVoice + | Vapi.CartesiaVoice + | Vapi.CustomVoice + | Vapi.DeepgramVoice + | Vapi.ElevenLabsVoice + | Vapi.HumeVoice + | Vapi.LmntVoice + | Vapi.NeuphonicVoice + | Vapi.OpenAiVoice + | Vapi.PlayHtVoice + | Vapi.RimeAiVoice + | Vapi.SmallestAiVoice + | Vapi.TavusVoice + | Vapi.VapiVoice + | Vapi.SesameVoice + | Vapi.InworldVoice + | Vapi.MinimaxVoice; diff --git a/src/api/types/TransferCallTool.ts b/src/api/types/TransferCallTool.ts index f42fc20c..e980226c 100644 --- a/src/api/types/TransferCallTool.ts +++ b/src/api/types/TransferCallTool.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferCallTool { /** diff --git a/src/api/types/TransferCallToolDestinationsItem.ts b/src/api/types/TransferCallToolDestinationsItem.ts index 2044b504..2d5b7c91 100644 --- a/src/api/types/TransferCallToolDestinationsItem.ts +++ b/src/api/types/TransferCallToolDestinationsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TransferCallToolDestinationsItem = | Vapi.TransferDestinationAssistant diff --git a/src/api/types/TransferCallToolMessagesItem.ts b/src/api/types/TransferCallToolMessagesItem.ts index 310e08ca..e39dbe35 100644 --- a/src/api/types/TransferCallToolMessagesItem.ts +++ b/src/api/types/TransferCallToolMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TransferCallToolMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/TransferCancelToolUserEditable.ts b/src/api/types/TransferCancelToolUserEditable.ts index 7b679eb0..ac63a654 100644 --- a/src/api/types/TransferCancelToolUserEditable.ts +++ b/src/api/types/TransferCancelToolUserEditable.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferCancelToolUserEditable { /** @@ -12,7 +10,7 @@ export interface TransferCancelToolUserEditable { */ messages?: Vapi.TransferCancelToolUserEditableMessagesItem[]; /** 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. */ - type: "transferCancel"; + type: Vapi.TransferCancelToolUserEditableType; /** * This is the plan to reject a tool call based on the conversation state. * diff --git a/src/api/types/TransferCancelToolUserEditableMessagesItem.ts b/src/api/types/TransferCancelToolUserEditableMessagesItem.ts index 6991e95f..02354e23 100644 --- a/src/api/types/TransferCancelToolUserEditableMessagesItem.ts +++ b/src/api/types/TransferCancelToolUserEditableMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TransferCancelToolUserEditableMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/TransferCancelToolUserEditableType.ts b/src/api/types/TransferCancelToolUserEditableType.ts new file mode 100644 index 00000000..fbd2804e --- /dev/null +++ b/src/api/types/TransferCancelToolUserEditableType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** 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. */ +export const TransferCancelToolUserEditableType = { + TransferCancel: "transferCancel", +} as const; +export type TransferCancelToolUserEditableType = + (typeof TransferCancelToolUserEditableType)[keyof typeof TransferCancelToolUserEditableType]; diff --git a/src/api/types/TransferDestinationAssistant.ts b/src/api/types/TransferDestinationAssistant.ts index 567fec3a..80dbfd79 100644 --- a/src/api/types/TransferDestinationAssistant.ts +++ b/src/api/types/TransferDestinationAssistant.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferDestinationAssistant { /** @@ -15,7 +13,7 @@ export interface TransferDestinationAssistant { * 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. */ message?: Vapi.TransferDestinationAssistantMessage; - type: "assistant"; + type: Vapi.TransferDestinationAssistantType; /** * This is the mode to use for the transfer. Defaults to `rolling-history`. * diff --git a/src/api/types/TransferDestinationAssistantMessage.ts b/src/api/types/TransferDestinationAssistantMessage.ts index 8691c127..4566eb33 100644 --- a/src/api/types/TransferDestinationAssistantMessage.ts +++ b/src/api/types/TransferDestinationAssistantMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is spoken to the customer before connecting them to the destination. diff --git a/src/api/types/TransferDestinationAssistantType.ts b/src/api/types/TransferDestinationAssistantType.ts new file mode 100644 index 00000000..cb7910c1 --- /dev/null +++ b/src/api/types/TransferDestinationAssistantType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TransferDestinationAssistantType = { + Assistant: "assistant", +} as const; +export type TransferDestinationAssistantType = + (typeof TransferDestinationAssistantType)[keyof typeof TransferDestinationAssistantType]; diff --git a/src/api/types/TransferDestinationNumber.ts b/src/api/types/TransferDestinationNumber.ts index 3b991406..14da289d 100644 --- a/src/api/types/TransferDestinationNumber.ts +++ b/src/api/types/TransferDestinationNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferDestinationNumber { /** @@ -15,7 +13,7 @@ export interface TransferDestinationNumber { * 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. */ message?: Vapi.TransferDestinationNumberMessage; - type: "number"; + type: Vapi.TransferDestinationNumberType; /** * 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. * diff --git a/src/api/types/TransferDestinationNumberMessage.ts b/src/api/types/TransferDestinationNumberMessage.ts index 853636c5..76c142ad 100644 --- a/src/api/types/TransferDestinationNumberMessage.ts +++ b/src/api/types/TransferDestinationNumberMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is spoken to the customer before connecting them to the destination. diff --git a/src/api/types/TransferDestinationNumberType.ts b/src/api/types/TransferDestinationNumberType.ts new file mode 100644 index 00000000..9bac5f4c --- /dev/null +++ b/src/api/types/TransferDestinationNumberType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TransferDestinationNumberType = { + Number: "number", +} as const; +export type TransferDestinationNumberType = + (typeof TransferDestinationNumberType)[keyof typeof TransferDestinationNumberType]; diff --git a/src/api/types/TransferDestinationSip.ts b/src/api/types/TransferDestinationSip.ts index 2e770694..b5fe742d 100644 --- a/src/api/types/TransferDestinationSip.ts +++ b/src/api/types/TransferDestinationSip.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferDestinationSip { /** @@ -15,7 +13,7 @@ export interface TransferDestinationSip { * 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. */ message?: Vapi.TransferDestinationSipMessage; - type: "sip"; + type: Vapi.TransferDestinationSipType; /** This is the SIP URI to transfer the call to. */ sipUri: string; /** diff --git a/src/api/types/TransferDestinationSipMessage.ts b/src/api/types/TransferDestinationSipMessage.ts index 034e4a7a..99bb7a23 100644 --- a/src/api/types/TransferDestinationSipMessage.ts +++ b/src/api/types/TransferDestinationSipMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is spoken to the customer before connecting them to the destination. diff --git a/src/api/types/TransferDestinationSipType.ts b/src/api/types/TransferDestinationSipType.ts new file mode 100644 index 00000000..f481d0d1 --- /dev/null +++ b/src/api/types/TransferDestinationSipType.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TransferDestinationSipType = { + Sip: "sip", +} as const; +export type TransferDestinationSipType = (typeof TransferDestinationSipType)[keyof typeof TransferDestinationSipType]; diff --git a/src/api/types/TransferFallbackPlan.ts b/src/api/types/TransferFallbackPlan.ts index 4b30e17e..928cf7b1 100644 --- a/src/api/types/TransferFallbackPlan.ts +++ b/src/api/types/TransferFallbackPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferFallbackPlan { /** This is the message the assistant will deliver to the customer if the transfer fails. */ diff --git a/src/api/types/TransferFallbackPlanMessage.ts b/src/api/types/TransferFallbackPlanMessage.ts index dedbda13..1e56b299 100644 --- a/src/api/types/TransferFallbackPlanMessage.ts +++ b/src/api/types/TransferFallbackPlanMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the message the assistant will deliver to the customer if the transfer fails. diff --git a/src/api/types/TransferHookAction.ts b/src/api/types/TransferHookAction.ts index 6d00db4f..855e429d 100644 --- a/src/api/types/TransferHookAction.ts +++ b/src/api/types/TransferHookAction.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferHookAction { /** This is the type of action - must be "transfer" */ - type: "transfer"; + type: Vapi.TransferHookActionType; /** This is the destination details for the transfer - can be a phone number or SIP URI */ destination?: Vapi.TransferHookActionDestination; } diff --git a/src/api/types/TransferHookActionDestination.ts b/src/api/types/TransferHookActionDestination.ts index e9d0dd23..16b6f2a7 100644 --- a/src/api/types/TransferHookActionDestination.ts +++ b/src/api/types/TransferHookActionDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination details for the transfer - can be a phone number or SIP URI diff --git a/src/api/types/TransferHookActionType.ts b/src/api/types/TransferHookActionType.ts new file mode 100644 index 00000000..0c69c28f --- /dev/null +++ b/src/api/types/TransferHookActionType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of action - must be "transfer" */ +export const TransferHookActionType = { + Transfer: "transfer", +} as const; +export type TransferHookActionType = (typeof TransferHookActionType)[keyof typeof TransferHookActionType]; diff --git a/src/api/types/TransferMode.ts b/src/api/types/TransferMode.ts index ecac92f4..92908f8b 100644 --- a/src/api/types/TransferMode.ts +++ b/src/api/types/TransferMode.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type TransferMode = "rolling-history" | "swap-system-message-in-history"; export const TransferMode = { RollingHistory: "rolling-history", SwapSystemMessageInHistory: "swap-system-message-in-history", } as const; +export type TransferMode = (typeof TransferMode)[keyof typeof TransferMode]; diff --git a/src/api/types/TransferPhoneNumberHookAction.ts b/src/api/types/TransferPhoneNumberHookAction.ts index 65d941c8..f8457eba 100644 --- a/src/api/types/TransferPhoneNumberHookAction.ts +++ b/src/api/types/TransferPhoneNumberHookAction.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferPhoneNumberHookAction { /** This is the type of action - must be "transfer" */ - type: "transfer"; + type: Vapi.TransferPhoneNumberHookActionType; /** This is the destination details for the transfer - can be a phone number or SIP URI */ destination?: Vapi.TransferPhoneNumberHookActionDestination; } diff --git a/src/api/types/TransferPhoneNumberHookActionDestination.ts b/src/api/types/TransferPhoneNumberHookActionDestination.ts index c760cdd5..f5899c01 100644 --- a/src/api/types/TransferPhoneNumberHookActionDestination.ts +++ b/src/api/types/TransferPhoneNumberHookActionDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the destination details for the transfer - can be a phone number or SIP URI diff --git a/src/api/types/TransferPhoneNumberHookActionType.ts b/src/api/types/TransferPhoneNumberHookActionType.ts new file mode 100644 index 00000000..5970e7f1 --- /dev/null +++ b/src/api/types/TransferPhoneNumberHookActionType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of action - must be "transfer" */ +export const TransferPhoneNumberHookActionType = { + Transfer: "transfer", +} as const; +export type TransferPhoneNumberHookActionType = + (typeof TransferPhoneNumberHookActionType)[keyof typeof TransferPhoneNumberHookActionType]; diff --git a/src/api/types/TransferPlan.ts b/src/api/types/TransferPlan.ts index 9e656c51..840c6b4c 100644 --- a/src/api/types/TransferPlan.ts +++ b/src/api/types/TransferPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferPlan { /** @@ -41,6 +39,14 @@ export interface TransferPlan { * - 'dial': Uses SIP DIAL to transfer the call */ sipVerb?: Record; + /** + * This sets the timeout for the dial operation in seconds. This is the duration the call will ring before timing out. + * + * Only applicable when `sipVerb='dial'`. Not applicable for SIP REFER or BYE. + * + * @default 60 + */ + dialTimeout?: number; /** * This is the URL to an audio file played while the customer is on hold during transfer. * @@ -63,6 +69,17 @@ export interface TransferPlan { * - Supported formats: MP3 and WAV. */ transferCompleteAudioUrl?: string; + /** + * 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' } + */ + contextEngineeringPlan?: Vapi.TransferPlanContextEngineeringPlan; /** * This is the TwiML instructions to execute on the destination call leg before connecting the customer. * diff --git a/src/api/types/TransferPlanContextEngineeringPlan.ts b/src/api/types/TransferPlanContextEngineeringPlan.ts new file mode 100644 index 00000000..aacf69aa --- /dev/null +++ b/src/api/types/TransferPlanContextEngineeringPlan.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +/** + * 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' } + */ +export type TransferPlanContextEngineeringPlan = + | Vapi.ContextEngineeringPlanLastNMessages + | Vapi.ContextEngineeringPlanNone + | Vapi.ContextEngineeringPlanAll; diff --git a/src/api/types/TransferPlanMessage.ts b/src/api/types/TransferPlanMessage.ts index eeedc0d7..915fab93 100644 --- a/src/api/types/TransferPlanMessage.ts +++ b/src/api/types/TransferPlanMessage.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the message the assistant will deliver to the destination party before connecting the customer. diff --git a/src/api/types/TransferPlanMode.ts b/src/api/types/TransferPlanMode.ts index 58825187..faa9ee14 100644 --- a/src/api/types/TransferPlanMode.ts +++ b/src/api/types/TransferPlanMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This configures how transfer is executed and the experience of the destination party receiving the call. @@ -17,15 +15,6 @@ * * @default 'blind-transfer' */ -export type TransferPlanMode = - | "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"; export const TransferPlanMode = { BlindTransfer: "blind-transfer", BlindTransferAddSummaryToSipHeader: "blind-transfer-add-summary-to-sip-header", @@ -38,3 +27,4 @@ export const TransferPlanMode = { "warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary", WarmTransferExperimental: "warm-transfer-experimental", } as const; +export type TransferPlanMode = (typeof TransferPlanMode)[keyof typeof TransferPlanMode]; diff --git a/src/api/types/TransferSuccessfulToolUserEditable.ts b/src/api/types/TransferSuccessfulToolUserEditable.ts index b55cd709..a03bd2c0 100644 --- a/src/api/types/TransferSuccessfulToolUserEditable.ts +++ b/src/api/types/TransferSuccessfulToolUserEditable.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransferSuccessfulToolUserEditable { /** @@ -12,7 +10,7 @@ export interface TransferSuccessfulToolUserEditable { */ messages?: Vapi.TransferSuccessfulToolUserEditableMessagesItem[]; /** 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. */ - type: "transferSuccessful"; + type: Vapi.TransferSuccessfulToolUserEditableType; /** * This is the plan to reject a tool call based on the conversation state. * diff --git a/src/api/types/TransferSuccessfulToolUserEditableMessagesItem.ts b/src/api/types/TransferSuccessfulToolUserEditableMessagesItem.ts index 0db3e831..e56ef927 100644 --- a/src/api/types/TransferSuccessfulToolUserEditableMessagesItem.ts +++ b/src/api/types/TransferSuccessfulToolUserEditableMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TransferSuccessfulToolUserEditableMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/TransferSuccessfulToolUserEditableType.ts b/src/api/types/TransferSuccessfulToolUserEditableType.ts new file mode 100644 index 00000000..c164e6bb --- /dev/null +++ b/src/api/types/TransferSuccessfulToolUserEditableType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** 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. */ +export const TransferSuccessfulToolUserEditableType = { + TransferSuccessful: "transferSuccessful", +} as const; +export type TransferSuccessfulToolUserEditableType = + (typeof TransferSuccessfulToolUserEditableType)[keyof typeof TransferSuccessfulToolUserEditableType]; diff --git a/src/api/types/TransportConfigurationTwilio.ts b/src/api/types/TransportConfigurationTwilio.ts index 03ac1565..e91009aa 100644 --- a/src/api/types/TransportConfigurationTwilio.ts +++ b/src/api/types/TransportConfigurationTwilio.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransportConfigurationTwilio { - provider: "twilio"; + provider: Vapi.TransportConfigurationTwilioProvider; /** * The integer number of seconds that we should allow the phone to ring before assuming there is no answer. * The default is `60` seconds and the maximum is `600` seconds. diff --git a/src/api/types/TransportConfigurationTwilioProvider.ts b/src/api/types/TransportConfigurationTwilioProvider.ts new file mode 100644 index 00000000..f5cdd277 --- /dev/null +++ b/src/api/types/TransportConfigurationTwilioProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TransportConfigurationTwilioProvider = { + Twilio: "twilio", +} as const; +export type TransportConfigurationTwilioProvider = + (typeof TransportConfigurationTwilioProvider)[keyof typeof TransportConfigurationTwilioProvider]; diff --git a/src/api/types/TransportConfigurationTwilioRecordingChannels.ts b/src/api/types/TransportConfigurationTwilioRecordingChannels.ts index 849a48ff..1247ac1c 100644 --- a/src/api/types/TransportConfigurationTwilioRecordingChannels.ts +++ b/src/api/types/TransportConfigurationTwilioRecordingChannels.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The number of channels in the final recording. @@ -12,8 +10,9 @@ * * @default 'mono' */ -export type TransportConfigurationTwilioRecordingChannels = "mono" | "dual"; export const TransportConfigurationTwilioRecordingChannels = { Mono: "mono", Dual: "dual", } as const; +export type TransportConfigurationTwilioRecordingChannels = + (typeof TransportConfigurationTwilioRecordingChannels)[keyof typeof TransportConfigurationTwilioRecordingChannels]; diff --git a/src/api/types/TransportCost.ts b/src/api/types/TransportCost.ts index b010ee3e..de0f700e 100644 --- a/src/api/types/TransportCost.ts +++ b/src/api/types/TransportCost.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TransportCost { /** This is the type of cost, always 'transport' for this class. */ - type: "transport"; + type: Vapi.TransportCostType; provider?: Vapi.TransportCostProvider; /** This is the minutes of `transport` usage. This should match `call.endedAt` - `call.startedAt`. */ minutes: number; diff --git a/src/api/types/TransportCostProvider.ts b/src/api/types/TransportCostProvider.ts index 5d328ba6..8295a535 100644 --- a/src/api/types/TransportCostProvider.ts +++ b/src/api/types/TransportCostProvider.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type TransportCostProvider = "daily" | "vapi.websocket" | "twilio" | "vonage" | "telnyx" | "vapi.sip"; export const TransportCostProvider = { Daily: "daily", VapiWebsocket: "vapi.websocket", @@ -11,3 +8,4 @@ export const TransportCostProvider = { Telnyx: "telnyx", VapiSip: "vapi.sip", } as const; +export type TransportCostProvider = (typeof TransportCostProvider)[keyof typeof TransportCostProvider]; diff --git a/src/api/types/TransportCostType.ts b/src/api/types/TransportCostType.ts new file mode 100644 index 00000000..03417c40 --- /dev/null +++ b/src/api/types/TransportCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'transport' for this class. */ +export const TransportCostType = { + Transport: "transport", +} as const; +export type TransportCostType = (typeof TransportCostType)[keyof typeof TransportCostType]; diff --git a/src/api/types/TrieveCredential.ts b/src/api/types/TrieveCredential.ts index ecb7b606..a73af00e 100644 --- a/src/api/types/TrieveCredential.ts +++ b/src/api/types/TrieveCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface TrieveCredential { - provider: "trieve"; + provider: Vapi.TrieveCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/TrieveCredentialProvider.ts b/src/api/types/TrieveCredentialProvider.ts new file mode 100644 index 00000000..3b6e9457 --- /dev/null +++ b/src/api/types/TrieveCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TrieveCredentialProvider = { + Trieve: "trieve", +} as const; +export type TrieveCredentialProvider = (typeof TrieveCredentialProvider)[keyof typeof TrieveCredentialProvider]; diff --git a/src/api/types/TrieveKnowledgeBase.ts b/src/api/types/TrieveKnowledgeBase.ts index e5d11b49..50d6d86f 100644 --- a/src/api/types/TrieveKnowledgeBase.ts +++ b/src/api/types/TrieveKnowledgeBase.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TrieveKnowledgeBase { /** @@ -10,7 +8,7 @@ export interface TrieveKnowledgeBase { * * To learn more about Trieve, visit https://trieve.ai. */ - provider: "trieve"; + provider: Vapi.TrieveKnowledgeBaseProvider; /** This is the name of the knowledge base. */ name?: string; /** diff --git a/src/api/types/TrieveKnowledgeBaseChunkPlan.ts b/src/api/types/TrieveKnowledgeBaseChunkPlan.ts index d9dc000a..9938f5a2 100644 --- a/src/api/types/TrieveKnowledgeBaseChunkPlan.ts +++ b/src/api/types/TrieveKnowledgeBaseChunkPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TrieveKnowledgeBaseChunkPlan { /** These are the file ids that will be used to create the vector store. To upload files, use the `POST /files` endpoint. */ diff --git a/src/api/types/TrieveKnowledgeBaseCreate.ts b/src/api/types/TrieveKnowledgeBaseCreate.ts index f8a86f29..bc018b85 100644 --- a/src/api/types/TrieveKnowledgeBaseCreate.ts +++ b/src/api/types/TrieveKnowledgeBaseCreate.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TrieveKnowledgeBaseCreate { /** This is to create a new dataset on Trieve. */ - type: "create"; + type: Vapi.TrieveKnowledgeBaseCreateType; /** These are the chunk plans used to create the dataset. */ chunkPlans: Vapi.TrieveKnowledgeBaseChunkPlan[]; } diff --git a/src/api/types/TrieveKnowledgeBaseCreateType.ts b/src/api/types/TrieveKnowledgeBaseCreateType.ts new file mode 100644 index 00000000..1800167a --- /dev/null +++ b/src/api/types/TrieveKnowledgeBaseCreateType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is to create a new dataset on Trieve. */ +export const TrieveKnowledgeBaseCreateType = { + Create: "create", +} as const; +export type TrieveKnowledgeBaseCreateType = + (typeof TrieveKnowledgeBaseCreateType)[keyof typeof TrieveKnowledgeBaseCreateType]; diff --git a/src/api/types/TrieveKnowledgeBaseImport.ts b/src/api/types/TrieveKnowledgeBaseImport.ts index 018528d1..9535b2c0 100644 --- a/src/api/types/TrieveKnowledgeBaseImport.ts +++ b/src/api/types/TrieveKnowledgeBaseImport.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface TrieveKnowledgeBaseImport { /** This is to import an existing dataset from Trieve. */ - type: "import"; + type: Vapi.TrieveKnowledgeBaseImportType; /** This is the `datasetId` of the dataset on your Trieve account. */ providerId: string; } diff --git a/src/api/types/TrieveKnowledgeBaseImportType.ts b/src/api/types/TrieveKnowledgeBaseImportType.ts new file mode 100644 index 00000000..5ae4b9a1 --- /dev/null +++ b/src/api/types/TrieveKnowledgeBaseImportType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is to import an existing dataset from Trieve. */ +export const TrieveKnowledgeBaseImportType = { + Import: "import", +} as const; +export type TrieveKnowledgeBaseImportType = + (typeof TrieveKnowledgeBaseImportType)[keyof typeof TrieveKnowledgeBaseImportType]; diff --git a/src/api/types/TrieveKnowledgeBaseProvider.ts b/src/api/types/TrieveKnowledgeBaseProvider.ts new file mode 100644 index 00000000..008a9f36 --- /dev/null +++ b/src/api/types/TrieveKnowledgeBaseProvider.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This knowledge base is provided by Trieve. + * + * To learn more about Trieve, visit https://trieve.ai. + */ +export const TrieveKnowledgeBaseProvider = { + Trieve: "trieve", +} as const; +export type TrieveKnowledgeBaseProvider = + (typeof TrieveKnowledgeBaseProvider)[keyof typeof TrieveKnowledgeBaseProvider]; diff --git a/src/api/types/TrieveKnowledgeBaseSearchPlan.ts b/src/api/types/TrieveKnowledgeBaseSearchPlan.ts index 41c2bb41..18bca665 100644 --- a/src/api/types/TrieveKnowledgeBaseSearchPlan.ts +++ b/src/api/types/TrieveKnowledgeBaseSearchPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TrieveKnowledgeBaseSearchPlan { /** Specifies the number of top chunks to return. This corresponds to the `page_size` parameter in Trieve. */ diff --git a/src/api/types/TrieveKnowledgeBaseSearchPlanSearchType.ts b/src/api/types/TrieveKnowledgeBaseSearchPlanSearchType.ts index c4696979..76a9fa14 100644 --- a/src/api/types/TrieveKnowledgeBaseSearchPlanSearchType.ts +++ b/src/api/types/TrieveKnowledgeBaseSearchPlanSearchType.ts @@ -1,14 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the search method used when searching for relevant chunks from the vector store. - */ -export type TrieveKnowledgeBaseSearchPlanSearchType = "fulltext" | "semantic" | "hybrid" | "bm25"; +/** This is the search method used when searching for relevant chunks from the vector store. */ export const TrieveKnowledgeBaseSearchPlanSearchType = { Fulltext: "fulltext", Semantic: "semantic", Hybrid: "hybrid", Bm25: "bm25", } as const; +export type TrieveKnowledgeBaseSearchPlanSearchType = + (typeof TrieveKnowledgeBaseSearchPlanSearchType)[keyof typeof TrieveKnowledgeBaseSearchPlanSearchType]; diff --git a/src/api/types/TurnLatency.ts b/src/api/types/TurnLatency.ts index ee2c2ee8..1e18a336 100644 --- a/src/api/types/TurnLatency.ts +++ b/src/api/types/TurnLatency.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TurnLatency { /** This is the model latency for the first token. */ diff --git a/src/api/types/TwilioCredential.ts b/src/api/types/TwilioCredential.ts index ca79c353..2d6d4a39 100644 --- a/src/api/types/TwilioCredential.ts +++ b/src/api/types/TwilioCredential.ts @@ -1,9 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface TwilioCredential { - provider: "twilio"; + provider: Vapi.TwilioCredentialProvider; /** This is not returned in the API. */ authToken?: string; /** This is not returned in the API. */ diff --git a/src/api/types/TwilioCredentialProvider.ts b/src/api/types/TwilioCredentialProvider.ts new file mode 100644 index 00000000..b9435c77 --- /dev/null +++ b/src/api/types/TwilioCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TwilioCredentialProvider = { + Twilio: "twilio", +} as const; +export type TwilioCredentialProvider = (typeof TwilioCredentialProvider)[keyof typeof TwilioCredentialProvider]; diff --git a/src/api/types/TwilioPhoneNumber.ts b/src/api/types/TwilioPhoneNumber.ts index a7d4d4a4..01712ef2 100644 --- a/src/api/types/TwilioPhoneNumber.ts +++ b/src/api/types/TwilioPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TwilioPhoneNumber { /** diff --git a/src/api/types/TwilioPhoneNumberFallbackDestination.ts b/src/api/types/TwilioPhoneNumberFallbackDestination.ts index 398f89f7..e52c83b3 100644 --- a/src/api/types/TwilioPhoneNumberFallbackDestination.ts +++ b/src/api/types/TwilioPhoneNumberFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/TwilioPhoneNumberHooksItem.ts b/src/api/types/TwilioPhoneNumberHooksItem.ts index 6e330fa5..043726fa 100644 --- a/src/api/types/TwilioPhoneNumberHooksItem.ts +++ b/src/api/types/TwilioPhoneNumberHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type TwilioPhoneNumberHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/TwilioPhoneNumberStatus.ts b/src/api/types/TwilioPhoneNumberStatus.ts index b5193a82..26830644 100644 --- a/src/api/types/TwilioPhoneNumberStatus.ts +++ b/src/api/types/TwilioPhoneNumberStatus.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the phone number. - */ -export type TwilioPhoneNumberStatus = "active" | "activating" | "blocked"; +/** This is the status of the phone number. */ export const TwilioPhoneNumberStatus = { Active: "active", Activating: "activating", Blocked: "blocked", } as const; +export type TwilioPhoneNumberStatus = (typeof TwilioPhoneNumberStatus)[keyof typeof TwilioPhoneNumberStatus]; diff --git a/src/api/types/TwilioSmsChatTransport.ts b/src/api/types/TwilioSmsChatTransport.ts index 81a6edc0..6b65fa77 100644 --- a/src/api/types/TwilioSmsChatTransport.ts +++ b/src/api/types/TwilioSmsChatTransport.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TwilioSmsChatTransport { + /** This is the conversation type of the call (ie, voice or chat). */ + conversationType?: Vapi.TwilioSmsChatTransportConversationType; /** * This is the phone number that will be used to send the SMS. * If provided, will create a new session. If not provided, uses existing session's phoneNumberId. @@ -27,5 +27,5 @@ export interface TwilioSmsChatTransport { * The type of transport to use for sending the chat response. * Currently supports 'twilio.sms' for SMS delivery via Twilio. */ - type: "twilio.sms"; + type: Vapi.TwilioSmsChatTransportType; } diff --git a/src/api/types/TwilioSmsChatTransportConversationType.ts b/src/api/types/TwilioSmsChatTransportConversationType.ts new file mode 100644 index 00000000..bfec9f51 --- /dev/null +++ b/src/api/types/TwilioSmsChatTransportConversationType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the conversation type of the call (ie, voice or chat). */ +export const TwilioSmsChatTransportConversationType = { + Chat: "chat", +} as const; +export type TwilioSmsChatTransportConversationType = + (typeof TwilioSmsChatTransportConversationType)[keyof typeof TwilioSmsChatTransportConversationType]; diff --git a/src/api/types/TwilioSmsChatTransportType.ts b/src/api/types/TwilioSmsChatTransportType.ts new file mode 100644 index 00000000..55c583a5 --- /dev/null +++ b/src/api/types/TwilioSmsChatTransportType.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The type of transport to use for sending the chat response. + * Currently supports 'twilio.sms' for SMS delivery via Twilio. + */ +export const TwilioSmsChatTransportType = { + TwilioSms: "twilio.sms", +} as const; +export type TwilioSmsChatTransportType = (typeof TwilioSmsChatTransportType)[keyof typeof TwilioSmsChatTransportType]; diff --git a/src/api/types/TwilioVoicemailDetectionPlan.ts b/src/api/types/TwilioVoicemailDetectionPlan.ts index d6860d91..4c7f3d78 100644 --- a/src/api/types/TwilioVoicemailDetectionPlan.ts +++ b/src/api/types/TwilioVoicemailDetectionPlan.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface TwilioVoicemailDetectionPlan { /** This is the provider to use for voicemail detection. */ - provider: "twilio"; + provider: Vapi.TwilioVoicemailDetectionPlanProvider; /** * These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence']. * diff --git a/src/api/types/TwilioVoicemailDetectionPlanProvider.ts b/src/api/types/TwilioVoicemailDetectionPlanProvider.ts new file mode 100644 index 00000000..62155d12 --- /dev/null +++ b/src/api/types/TwilioVoicemailDetectionPlanProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider to use for voicemail detection. */ +export const TwilioVoicemailDetectionPlanProvider = { + Twilio: "twilio", +} as const; +export type TwilioVoicemailDetectionPlanProvider = + (typeof TwilioVoicemailDetectionPlanProvider)[keyof typeof TwilioVoicemailDetectionPlanProvider]; diff --git a/src/api/types/TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem.ts b/src/api/types/TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem.ts index 5244d060..34623dbf 100644 --- a/src/api/types/TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem.ts +++ b/src/api/types/TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem.ts @@ -1,15 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem = - | "machine_start" - | "human" - | "fax" - | "unknown" - | "machine_end_beep" - | "machine_end_silence" - | "machine_end_other"; export const TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem = { MachineStart: "machine_start", Human: "human", @@ -19,3 +9,5 @@ export const TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem = { MachineEndSilence: "machine_end_silence", MachineEndOther: "machine_end_other", } as const; +export type TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem = + (typeof TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem)[keyof typeof TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem]; diff --git a/src/api/types/UpdateAnthropicCredentialDto.ts b/src/api/types/UpdateAnthropicCredentialDto.ts index f56fa8c3..ddb39c22 100644 --- a/src/api/types/UpdateAnthropicCredentialDto.ts +++ b/src/api/types/UpdateAnthropicCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateAnthropicCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateAnyscaleCredentialDto.ts b/src/api/types/UpdateAnyscaleCredentialDto.ts index 9f860761..0ac9cfe0 100644 --- a/src/api/types/UpdateAnyscaleCredentialDto.ts +++ b/src/api/types/UpdateAnyscaleCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateAnyscaleCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateApiRequestToolDto.ts b/src/api/types/UpdateApiRequestToolDto.ts index e9137096..5fd34b59 100644 --- a/src/api/types/UpdateApiRequestToolDto.ts +++ b/src/api/types/UpdateApiRequestToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateApiRequestToolDto { /** diff --git a/src/api/types/UpdateApiRequestToolDtoMessagesItem.ts b/src/api/types/UpdateApiRequestToolDtoMessagesItem.ts index 2bbd60db..dd97f592 100644 --- a/src/api/types/UpdateApiRequestToolDtoMessagesItem.ts +++ b/src/api/types/UpdateApiRequestToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateApiRequestToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateApiRequestToolDtoMethod.ts b/src/api/types/UpdateApiRequestToolDtoMethod.ts index 51d7f2b2..eb76c8ea 100644 --- a/src/api/types/UpdateApiRequestToolDtoMethod.ts +++ b/src/api/types/UpdateApiRequestToolDtoMethod.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateApiRequestToolDtoMethod = "POST" | "GET" | "PUT" | "PATCH" | "DELETE"; export const UpdateApiRequestToolDtoMethod = { Post: "POST", Get: "GET", @@ -10,3 +7,5 @@ export const UpdateApiRequestToolDtoMethod = { Patch: "PATCH", Delete: "DELETE", } as const; +export type UpdateApiRequestToolDtoMethod = + (typeof UpdateApiRequestToolDtoMethod)[keyof typeof UpdateApiRequestToolDtoMethod]; diff --git a/src/api/types/UpdateAssemblyAiCredentialDto.ts b/src/api/types/UpdateAssemblyAiCredentialDto.ts index 7fcd4dcb..98cd9e4e 100644 --- a/src/api/types/UpdateAssemblyAiCredentialDto.ts +++ b/src/api/types/UpdateAssemblyAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateAssemblyAiCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateAzureCredentialDto.ts b/src/api/types/UpdateAzureCredentialDto.ts index 2ee4719d..a68c9a04 100644 --- a/src/api/types/UpdateAzureCredentialDto.ts +++ b/src/api/types/UpdateAzureCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateAzureCredentialDto { /** This is the service being used in Azure. */ diff --git a/src/api/types/UpdateAzureCredentialDtoRegion.ts b/src/api/types/UpdateAzureCredentialDtoRegion.ts index b0281e11..469c9ecc 100644 --- a/src/api/types/UpdateAzureCredentialDtoRegion.ts +++ b/src/api/types/UpdateAzureCredentialDtoRegion.ts @@ -1,29 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the region of the Azure resource. - */ -export type UpdateAzureCredentialDtoRegion = - | "australia" - | "canadaeast" - | "canadacentral" - | "eastus2" - | "eastus" - | "france" - | "india" - | "japaneast" - | "japanwest" - | "uaenorth" - | "northcentralus" - | "norway" - | "southcentralus" - | "swedencentral" - | "switzerland" - | "uk" - | "westus" - | "westus3"; +/** This is the region of the Azure resource. */ export const UpdateAzureCredentialDtoRegion = { Australia: "australia", Canadaeast: "canadaeast", @@ -44,3 +21,5 @@ export const UpdateAzureCredentialDtoRegion = { Westus: "westus", Westus3: "westus3", } as const; +export type UpdateAzureCredentialDtoRegion = + (typeof UpdateAzureCredentialDtoRegion)[keyof typeof UpdateAzureCredentialDtoRegion]; diff --git a/src/api/types/UpdateAzureCredentialDtoService.ts b/src/api/types/UpdateAzureCredentialDtoService.ts index e4511726..f16a9968 100644 --- a/src/api/types/UpdateAzureCredentialDtoService.ts +++ b/src/api/types/UpdateAzureCredentialDtoService.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the service being used in Azure. - */ -export type UpdateAzureCredentialDtoService = "speech" | "blob_storage"; +/** This is the service being used in Azure. */ export const UpdateAzureCredentialDtoService = { Speech: "speech", BlobStorage: "blob_storage", } as const; +export type UpdateAzureCredentialDtoService = + (typeof UpdateAzureCredentialDtoService)[keyof typeof UpdateAzureCredentialDtoService]; diff --git a/src/api/types/UpdateAzureOpenAiCredentialDto.ts b/src/api/types/UpdateAzureOpenAiCredentialDto.ts index 66599c81..112914bb 100644 --- a/src/api/types/UpdateAzureOpenAiCredentialDto.ts +++ b/src/api/types/UpdateAzureOpenAiCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateAzureOpenAiCredentialDto { region?: Vapi.UpdateAzureOpenAiCredentialDtoRegion; diff --git a/src/api/types/UpdateAzureOpenAiCredentialDtoModelsItem.ts b/src/api/types/UpdateAzureOpenAiCredentialDtoModelsItem.ts index e90bd53e..9305c834 100644 --- a/src/api/types/UpdateAzureOpenAiCredentialDtoModelsItem.ts +++ b/src/api/types/UpdateAzureOpenAiCredentialDtoModelsItem.ts @@ -1,24 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateAzureOpenAiCredentialDtoModelsItem = - | "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" - | "gpt-4-0613" - | "gpt-35-turbo-0125" - | "gpt-35-turbo-1106"; export const UpdateAzureOpenAiCredentialDtoModelsItem = { Gpt5: "gpt-5", Gpt5Mini: "gpt-5-mini", @@ -37,3 +18,5 @@ export const UpdateAzureOpenAiCredentialDtoModelsItem = { Gpt35Turbo0125: "gpt-35-turbo-0125", Gpt35Turbo1106: "gpt-35-turbo-1106", } as const; +export type UpdateAzureOpenAiCredentialDtoModelsItem = + (typeof UpdateAzureOpenAiCredentialDtoModelsItem)[keyof typeof UpdateAzureOpenAiCredentialDtoModelsItem]; diff --git a/src/api/types/UpdateAzureOpenAiCredentialDtoRegion.ts b/src/api/types/UpdateAzureOpenAiCredentialDtoRegion.ts index 285d0086..590c4e63 100644 --- a/src/api/types/UpdateAzureOpenAiCredentialDtoRegion.ts +++ b/src/api/types/UpdateAzureOpenAiCredentialDtoRegion.ts @@ -1,26 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateAzureOpenAiCredentialDtoRegion = - | "australia" - | "canadaeast" - | "canadacentral" - | "eastus2" - | "eastus" - | "france" - | "india" - | "japaneast" - | "japanwest" - | "uaenorth" - | "northcentralus" - | "norway" - | "southcentralus" - | "swedencentral" - | "switzerland" - | "uk" - | "westus" - | "westus3"; export const UpdateAzureOpenAiCredentialDtoRegion = { Australia: "australia", Canadaeast: "canadaeast", @@ -41,3 +20,5 @@ export const UpdateAzureOpenAiCredentialDtoRegion = { Westus: "westus", Westus3: "westus3", } as const; +export type UpdateAzureOpenAiCredentialDtoRegion = + (typeof UpdateAzureOpenAiCredentialDtoRegion)[keyof typeof UpdateAzureOpenAiCredentialDtoRegion]; diff --git a/src/api/types/UpdateBarInsightFromCallTableDto.ts b/src/api/types/UpdateBarInsightFromCallTableDto.ts new file mode 100644 index 00000000..3627940c --- /dev/null +++ b/src/api/types/UpdateBarInsightFromCallTableDto.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface UpdateBarInsightFromCallTableDto { + /** This is the name of the Insight. */ + name?: string; + type: "bar"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + /** This is the metadata for the insight. */ + metadata?: Vapi.BarInsightMetadata; + timeRange?: Vapi.InsightTimeRangeWithStep; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.UpdateBarInsightFromCallTableDtoGroupBy; + /** These are the queries to run to generate the insight. */ + queries?: Vapi.UpdateBarInsightFromCallTableDtoQueriesItem[]; +} diff --git a/src/api/types/UpdateBarInsightFromCallTableDtoGroupBy.ts b/src/api/types/UpdateBarInsightFromCallTableDtoGroupBy.ts new file mode 100644 index 00000000..0a72f9ca --- /dev/null +++ b/src/api/types/UpdateBarInsightFromCallTableDtoGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const UpdateBarInsightFromCallTableDtoGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type UpdateBarInsightFromCallTableDtoGroupBy = + (typeof UpdateBarInsightFromCallTableDtoGroupBy)[keyof typeof UpdateBarInsightFromCallTableDtoGroupBy]; diff --git a/src/api/types/UpdateBarInsightFromCallTableDtoQueriesItem.ts b/src/api/types/UpdateBarInsightFromCallTableDtoQueriesItem.ts new file mode 100644 index 00000000..e16e760c --- /dev/null +++ b/src/api/types/UpdateBarInsightFromCallTableDtoQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type UpdateBarInsightFromCallTableDtoQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/UpdateBashToolDto.ts b/src/api/types/UpdateBashToolDto.ts index 9c07d2e2..171a88ed 100644 --- a/src/api/types/UpdateBashToolDto.ts +++ b/src/api/types/UpdateBashToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateBashToolDto { /** @@ -12,7 +10,7 @@ export interface UpdateBashToolDto { */ messages?: Vapi.UpdateBashToolDtoMessagesItem[]; /** The sub type of tool. */ - subType?: "bash_20241022"; + subType?: Vapi.UpdateBashToolDtoSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -106,5 +104,5 @@ export interface UpdateBashToolDto { */ rejectionPlan?: Vapi.ToolRejectionPlan; /** The name of the tool, fixed to 'bash' */ - name?: "bash"; + name?: Vapi.UpdateBashToolDtoName; } diff --git a/src/api/types/UpdateBashToolDtoMessagesItem.ts b/src/api/types/UpdateBashToolDtoMessagesItem.ts index 2f5d1e20..210e2ae4 100644 --- a/src/api/types/UpdateBashToolDtoMessagesItem.ts +++ b/src/api/types/UpdateBashToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateBashToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateBashToolDtoName.ts b/src/api/types/UpdateBashToolDtoName.ts new file mode 100644 index 00000000..f00eeb8b --- /dev/null +++ b/src/api/types/UpdateBashToolDtoName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'bash' */ +export const UpdateBashToolDtoName = { + Bash: "bash", +} as const; +export type UpdateBashToolDtoName = (typeof UpdateBashToolDtoName)[keyof typeof UpdateBashToolDtoName]; diff --git a/src/api/types/UpdateBashToolDtoSubType.ts b/src/api/types/UpdateBashToolDtoSubType.ts new file mode 100644 index 00000000..556f7d88 --- /dev/null +++ b/src/api/types/UpdateBashToolDtoSubType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const UpdateBashToolDtoSubType = { + Bash20241022: "bash_20241022", +} as const; +export type UpdateBashToolDtoSubType = (typeof UpdateBashToolDtoSubType)[keyof typeof UpdateBashToolDtoSubType]; diff --git a/src/api/types/UpdateByoPhoneNumberDto.ts b/src/api/types/UpdateByoPhoneNumberDto.ts index 7f609395..6141f87c 100644 --- a/src/api/types/UpdateByoPhoneNumberDto.ts +++ b/src/api/types/UpdateByoPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateByoPhoneNumberDto { /** diff --git a/src/api/types/UpdateByoPhoneNumberDtoFallbackDestination.ts b/src/api/types/UpdateByoPhoneNumberDtoFallbackDestination.ts index 6839d393..18c9f90c 100644 --- a/src/api/types/UpdateByoPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/UpdateByoPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/UpdateByoPhoneNumberDtoHooksItem.ts b/src/api/types/UpdateByoPhoneNumberDtoHooksItem.ts index f2f8f294..03cad011 100644 --- a/src/api/types/UpdateByoPhoneNumberDtoHooksItem.ts +++ b/src/api/types/UpdateByoPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateByoPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/UpdateByoSipTrunkCredentialDto.ts b/src/api/types/UpdateByoSipTrunkCredentialDto.ts index 4f12d986..aca7356d 100644 --- a/src/api/types/UpdateByoSipTrunkCredentialDto.ts +++ b/src/api/types/UpdateByoSipTrunkCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateByoSipTrunkCredentialDto { /** This is the name of credential. This is just for your reference. */ diff --git a/src/api/types/UpdateCartesiaCredentialDto.ts b/src/api/types/UpdateCartesiaCredentialDto.ts index 8e30939a..e57f4e60 100644 --- a/src/api/types/UpdateCartesiaCredentialDto.ts +++ b/src/api/types/UpdateCartesiaCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateCartesiaCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateCerebrasCredentialDto.ts b/src/api/types/UpdateCerebrasCredentialDto.ts index b1efc84f..583821b9 100644 --- a/src/api/types/UpdateCerebrasCredentialDto.ts +++ b/src/api/types/UpdateCerebrasCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateCerebrasCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateCloudflareCredentialDto.ts b/src/api/types/UpdateCloudflareCredentialDto.ts index a8850592..b7947111 100644 --- a/src/api/types/UpdateCloudflareCredentialDto.ts +++ b/src/api/types/UpdateCloudflareCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateCloudflareCredentialDto { /** Cloudflare Account Id. */ diff --git a/src/api/types/UpdateComputerToolDto.ts b/src/api/types/UpdateComputerToolDto.ts index 13db7e76..992fcadb 100644 --- a/src/api/types/UpdateComputerToolDto.ts +++ b/src/api/types/UpdateComputerToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateComputerToolDto { /** @@ -12,7 +10,7 @@ export interface UpdateComputerToolDto { */ messages?: Vapi.UpdateComputerToolDtoMessagesItem[]; /** The sub type of tool. */ - subType?: "computer_20241022"; + subType?: Vapi.UpdateComputerToolDtoSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -106,7 +104,7 @@ export interface UpdateComputerToolDto { */ rejectionPlan?: Vapi.ToolRejectionPlan; /** The name of the tool, fixed to 'computer' */ - name?: "computer"; + name?: Vapi.UpdateComputerToolDtoName; /** The display width in pixels */ displayWidthPx?: number; /** The display height in pixels */ diff --git a/src/api/types/UpdateComputerToolDtoMessagesItem.ts b/src/api/types/UpdateComputerToolDtoMessagesItem.ts index f9e9d700..b82f1f65 100644 --- a/src/api/types/UpdateComputerToolDtoMessagesItem.ts +++ b/src/api/types/UpdateComputerToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateComputerToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateComputerToolDtoName.ts b/src/api/types/UpdateComputerToolDtoName.ts new file mode 100644 index 00000000..add037d3 --- /dev/null +++ b/src/api/types/UpdateComputerToolDtoName.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'computer' */ +export const UpdateComputerToolDtoName = { + Computer: "computer", +} as const; +export type UpdateComputerToolDtoName = (typeof UpdateComputerToolDtoName)[keyof typeof UpdateComputerToolDtoName]; diff --git a/src/api/types/UpdateComputerToolDtoSubType.ts b/src/api/types/UpdateComputerToolDtoSubType.ts new file mode 100644 index 00000000..df67daef --- /dev/null +++ b/src/api/types/UpdateComputerToolDtoSubType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const UpdateComputerToolDtoSubType = { + Computer20241022: "computer_20241022", +} as const; +export type UpdateComputerToolDtoSubType = + (typeof UpdateComputerToolDtoSubType)[keyof typeof UpdateComputerToolDtoSubType]; diff --git a/src/api/types/UpdateCustomCredentialDto.ts b/src/api/types/UpdateCustomCredentialDto.ts index a42eb1ea..e9d4ac58 100644 --- a/src/api/types/UpdateCustomCredentialDto.ts +++ b/src/api/types/UpdateCustomCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateCustomCredentialDto { /** This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. */ diff --git a/src/api/types/UpdateCustomCredentialDtoAuthenticationPlan.ts b/src/api/types/UpdateCustomCredentialDtoAuthenticationPlan.ts index eef99a4a..4f0da378 100644 --- a/src/api/types/UpdateCustomCredentialDtoAuthenticationPlan.ts +++ b/src/api/types/UpdateCustomCredentialDtoAuthenticationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. diff --git a/src/api/types/UpdateCustomKnowledgeBaseDto.ts b/src/api/types/UpdateCustomKnowledgeBaseDto.ts index 06433851..728638ba 100644 --- a/src/api/types/UpdateCustomKnowledgeBaseDto.ts +++ b/src/api/types/UpdateCustomKnowledgeBaseDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateCustomKnowledgeBaseDto { /** diff --git a/src/api/types/UpdateCustomLlmCredentialDto.ts b/src/api/types/UpdateCustomLlmCredentialDto.ts index 34086dd9..6a5f8de8 100644 --- a/src/api/types/UpdateCustomLlmCredentialDto.ts +++ b/src/api/types/UpdateCustomLlmCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateCustomLlmCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateDeepInfraCredentialDto.ts b/src/api/types/UpdateDeepInfraCredentialDto.ts index bdc81300..ee7e99f5 100644 --- a/src/api/types/UpdateDeepInfraCredentialDto.ts +++ b/src/api/types/UpdateDeepInfraCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateDeepInfraCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateDeepSeekCredentialDto.ts b/src/api/types/UpdateDeepSeekCredentialDto.ts index 4154c71c..5fb62ea4 100644 --- a/src/api/types/UpdateDeepSeekCredentialDto.ts +++ b/src/api/types/UpdateDeepSeekCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateDeepSeekCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateDeepgramCredentialDto.ts b/src/api/types/UpdateDeepgramCredentialDto.ts index 1f5a76f7..ba98939f 100644 --- a/src/api/types/UpdateDeepgramCredentialDto.ts +++ b/src/api/types/UpdateDeepgramCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateDeepgramCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateDtmfToolDto.ts b/src/api/types/UpdateDtmfToolDto.ts index 5f184099..598d7698 100644 --- a/src/api/types/UpdateDtmfToolDto.ts +++ b/src/api/types/UpdateDtmfToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateDtmfToolDto { /** diff --git a/src/api/types/UpdateDtmfToolDtoMessagesItem.ts b/src/api/types/UpdateDtmfToolDtoMessagesItem.ts index 9e48dea5..8a6cd58a 100644 --- a/src/api/types/UpdateDtmfToolDtoMessagesItem.ts +++ b/src/api/types/UpdateDtmfToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateDtmfToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateElevenLabsCredentialDto.ts b/src/api/types/UpdateElevenLabsCredentialDto.ts index 123b5038..50c64405 100644 --- a/src/api/types/UpdateElevenLabsCredentialDto.ts +++ b/src/api/types/UpdateElevenLabsCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateElevenLabsCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateEndCallToolDto.ts b/src/api/types/UpdateEndCallToolDto.ts index 18d627f2..378f033c 100644 --- a/src/api/types/UpdateEndCallToolDto.ts +++ b/src/api/types/UpdateEndCallToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateEndCallToolDto { /** diff --git a/src/api/types/UpdateEndCallToolDtoMessagesItem.ts b/src/api/types/UpdateEndCallToolDtoMessagesItem.ts index 034bd9d4..8418c08f 100644 --- a/src/api/types/UpdateEndCallToolDtoMessagesItem.ts +++ b/src/api/types/UpdateEndCallToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateEndCallToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateFunctionToolDto.ts b/src/api/types/UpdateFunctionToolDto.ts index c098ba13..5d00e1f9 100644 --- a/src/api/types/UpdateFunctionToolDto.ts +++ b/src/api/types/UpdateFunctionToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateFunctionToolDto { /** diff --git a/src/api/types/UpdateFunctionToolDtoMessagesItem.ts b/src/api/types/UpdateFunctionToolDtoMessagesItem.ts index ebd09301..920f00eb 100644 --- a/src/api/types/UpdateFunctionToolDtoMessagesItem.ts +++ b/src/api/types/UpdateFunctionToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateFunctionToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGcpCredentialDto.ts b/src/api/types/UpdateGcpCredentialDto.ts index 9e9b39c2..7da9ca86 100644 --- a/src/api/types/UpdateGcpCredentialDto.ts +++ b/src/api/types/UpdateGcpCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGcpCredentialDto { /** This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order. */ diff --git a/src/api/types/UpdateGhlToolDto.ts b/src/api/types/UpdateGhlToolDto.ts index 87439bab..6a9560e9 100644 --- a/src/api/types/UpdateGhlToolDto.ts +++ b/src/api/types/UpdateGhlToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGhlToolDto { /** diff --git a/src/api/types/UpdateGhlToolDtoMessagesItem.ts b/src/api/types/UpdateGhlToolDtoMessagesItem.ts index 7cbc99cd..778e4fae 100644 --- a/src/api/types/UpdateGhlToolDtoMessagesItem.ts +++ b/src/api/types/UpdateGhlToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateGhlToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGladiaCredentialDto.ts b/src/api/types/UpdateGladiaCredentialDto.ts index 9e7470e6..dbc8cb04 100644 --- a/src/api/types/UpdateGladiaCredentialDto.ts +++ b/src/api/types/UpdateGladiaCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGladiaCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDto.ts b/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDto.ts index dc1452fb..75240366 100644 --- a/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDto.ts +++ b/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGoHighLevelCalendarAvailabilityToolDto { /** diff --git a/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.ts b/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.ts index a7ebf750..9e6755a3 100644 --- a/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.ts +++ b/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDto.ts b/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDto.ts index ece49b38..204a1548 100644 --- a/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDto.ts +++ b/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGoHighLevelCalendarEventCreateToolDto { /** diff --git a/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem.ts b/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem.ts index 663c14d4..6ad39fcf 100644 --- a/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem.ts +++ b/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGoHighLevelContactCreateToolDto.ts b/src/api/types/UpdateGoHighLevelContactCreateToolDto.ts index bcfcc6b9..64ac3580 100644 --- a/src/api/types/UpdateGoHighLevelContactCreateToolDto.ts +++ b/src/api/types/UpdateGoHighLevelContactCreateToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGoHighLevelContactCreateToolDto { /** diff --git a/src/api/types/UpdateGoHighLevelContactCreateToolDtoMessagesItem.ts b/src/api/types/UpdateGoHighLevelContactCreateToolDtoMessagesItem.ts index 115e9016..ccff6e0a 100644 --- a/src/api/types/UpdateGoHighLevelContactCreateToolDtoMessagesItem.ts +++ b/src/api/types/UpdateGoHighLevelContactCreateToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateGoHighLevelContactCreateToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGoHighLevelContactGetToolDto.ts b/src/api/types/UpdateGoHighLevelContactGetToolDto.ts index 51ca3099..b17e5117 100644 --- a/src/api/types/UpdateGoHighLevelContactGetToolDto.ts +++ b/src/api/types/UpdateGoHighLevelContactGetToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGoHighLevelContactGetToolDto { /** diff --git a/src/api/types/UpdateGoHighLevelContactGetToolDtoMessagesItem.ts b/src/api/types/UpdateGoHighLevelContactGetToolDtoMessagesItem.ts index 92017d2e..d0edec1d 100644 --- a/src/api/types/UpdateGoHighLevelContactGetToolDtoMessagesItem.ts +++ b/src/api/types/UpdateGoHighLevelContactGetToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateGoHighLevelContactGetToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGoHighLevelCredentialDto.ts b/src/api/types/UpdateGoHighLevelCredentialDto.ts index a15a237f..2c9bdbbc 100644 --- a/src/api/types/UpdateGoHighLevelCredentialDto.ts +++ b/src/api/types/UpdateGoHighLevelCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGoHighLevelCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateGoHighLevelMcpCredentialDto.ts b/src/api/types/UpdateGoHighLevelMcpCredentialDto.ts index 0ac57cae..be09f3fa 100644 --- a/src/api/types/UpdateGoHighLevelMcpCredentialDto.ts +++ b/src/api/types/UpdateGoHighLevelMcpCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGoHighLevelMcpCredentialDto { /** This is the authentication session for the credential. */ diff --git a/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDto.ts b/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDto.ts index 41716e68..eeb1f9cb 100644 --- a/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDto.ts +++ b/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGoogleCalendarCheckAvailabilityToolDto { /** diff --git a/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.ts b/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.ts index be127b94..40c1e881 100644 --- a/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.ts +++ b/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGoogleCalendarCreateEventToolDto.ts b/src/api/types/UpdateGoogleCalendarCreateEventToolDto.ts index 53e3d039..880686f7 100644 --- a/src/api/types/UpdateGoogleCalendarCreateEventToolDto.ts +++ b/src/api/types/UpdateGoogleCalendarCreateEventToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGoogleCalendarCreateEventToolDto { /** diff --git a/src/api/types/UpdateGoogleCalendarCreateEventToolDtoMessagesItem.ts b/src/api/types/UpdateGoogleCalendarCreateEventToolDtoMessagesItem.ts index 9b35ff18..18622de8 100644 --- a/src/api/types/UpdateGoogleCalendarCreateEventToolDtoMessagesItem.ts +++ b/src/api/types/UpdateGoogleCalendarCreateEventToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateGoogleCalendarCreateEventToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGoogleCalendarOAuth2AuthorizationCredentialDto.ts b/src/api/types/UpdateGoogleCalendarOAuth2AuthorizationCredentialDto.ts index eb6609cb..eabc7ff4 100644 --- a/src/api/types/UpdateGoogleCalendarOAuth2AuthorizationCredentialDto.ts +++ b/src/api/types/UpdateGoogleCalendarOAuth2AuthorizationCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGoogleCalendarOAuth2AuthorizationCredentialDto { /** The authorization ID for the OAuth2 authorization */ diff --git a/src/api/types/UpdateGoogleCalendarOAuth2ClientCredentialDto.ts b/src/api/types/UpdateGoogleCalendarOAuth2ClientCredentialDto.ts index 2917e79f..ca140393 100644 --- a/src/api/types/UpdateGoogleCalendarOAuth2ClientCredentialDto.ts +++ b/src/api/types/UpdateGoogleCalendarOAuth2ClientCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGoogleCalendarOAuth2ClientCredentialDto { /** This is the name of credential. This is just for your reference. */ diff --git a/src/api/types/UpdateGoogleCredentialDto.ts b/src/api/types/UpdateGoogleCredentialDto.ts index a9e90d4e..064892be 100644 --- a/src/api/types/UpdateGoogleCredentialDto.ts +++ b/src/api/types/UpdateGoogleCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGoogleCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateGoogleSheetsOAuth2AuthorizationCredentialDto.ts b/src/api/types/UpdateGoogleSheetsOAuth2AuthorizationCredentialDto.ts index 53386188..fc1d6ef4 100644 --- a/src/api/types/UpdateGoogleSheetsOAuth2AuthorizationCredentialDto.ts +++ b/src/api/types/UpdateGoogleSheetsOAuth2AuthorizationCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGoogleSheetsOAuth2AuthorizationCredentialDto { /** The authorization ID for the OAuth2 authorization */ diff --git a/src/api/types/UpdateGoogleSheetsRowAppendToolDto.ts b/src/api/types/UpdateGoogleSheetsRowAppendToolDto.ts index e4489f10..35b4e9f7 100644 --- a/src/api/types/UpdateGoogleSheetsRowAppendToolDto.ts +++ b/src/api/types/UpdateGoogleSheetsRowAppendToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateGoogleSheetsRowAppendToolDto { /** diff --git a/src/api/types/UpdateGoogleSheetsRowAppendToolDtoMessagesItem.ts b/src/api/types/UpdateGoogleSheetsRowAppendToolDtoMessagesItem.ts index 2612cdf7..50e3007e 100644 --- a/src/api/types/UpdateGoogleSheetsRowAppendToolDtoMessagesItem.ts +++ b/src/api/types/UpdateGoogleSheetsRowAppendToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateGoogleSheetsRowAppendToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateGroqCredentialDto.ts b/src/api/types/UpdateGroqCredentialDto.ts index 26097bfd..42f5b4fc 100644 --- a/src/api/types/UpdateGroqCredentialDto.ts +++ b/src/api/types/UpdateGroqCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGroqCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateHandoffToolDto.ts b/src/api/types/UpdateHandoffToolDto.ts index 37415b7f..5cca0939 100644 --- a/src/api/types/UpdateHandoffToolDto.ts +++ b/src/api/types/UpdateHandoffToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateHandoffToolDto { /** diff --git a/src/api/types/UpdateHandoffToolDtoDestinationsItem.ts b/src/api/types/UpdateHandoffToolDtoDestinationsItem.ts index 0d157add..317ccc9a 100644 --- a/src/api/types/UpdateHandoffToolDtoDestinationsItem.ts +++ b/src/api/types/UpdateHandoffToolDtoDestinationsItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateHandoffToolDtoDestinationsItem = Vapi.HandoffDestinationAssistant | Vapi.HandoffDestinationDynamic; diff --git a/src/api/types/UpdateHandoffToolDtoMessagesItem.ts b/src/api/types/UpdateHandoffToolDtoMessagesItem.ts index deabeecb..0424ea53 100644 --- a/src/api/types/UpdateHandoffToolDtoMessagesItem.ts +++ b/src/api/types/UpdateHandoffToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateHandoffToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateHumeCredentialDto.ts b/src/api/types/UpdateHumeCredentialDto.ts index 092a2496..b49b9089 100644 --- a/src/api/types/UpdateHumeCredentialDto.ts +++ b/src/api/types/UpdateHumeCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateHumeCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateInflectionAiCredentialDto.ts b/src/api/types/UpdateInflectionAiCredentialDto.ts index e3ac8f98..17468b06 100644 --- a/src/api/types/UpdateInflectionAiCredentialDto.ts +++ b/src/api/types/UpdateInflectionAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateInflectionAiCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateInworldCredentialDto.ts b/src/api/types/UpdateInworldCredentialDto.ts index 106b002a..fd153c40 100644 --- a/src/api/types/UpdateInworldCredentialDto.ts +++ b/src/api/types/UpdateInworldCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateInworldCredentialDto { /** This is the Inworld Basic (Base64) authentication token. This is not returned in the API. */ diff --git a/src/api/types/UpdateLangfuseCredentialDto.ts b/src/api/types/UpdateLangfuseCredentialDto.ts index 199e5f82..4f70c960 100644 --- a/src/api/types/UpdateLangfuseCredentialDto.ts +++ b/src/api/types/UpdateLangfuseCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateLangfuseCredentialDto { /** The public key for Langfuse project. Eg: pk-lf-... */ diff --git a/src/api/types/UpdateLineInsightFromCallTableDto.ts b/src/api/types/UpdateLineInsightFromCallTableDto.ts new file mode 100644 index 00000000..489e1efa --- /dev/null +++ b/src/api/types/UpdateLineInsightFromCallTableDto.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface UpdateLineInsightFromCallTableDto { + /** This is the name of the Insight. */ + name?: string; + type: "line"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + /** This is the metadata for the insight. */ + metadata?: Vapi.LineInsightMetadata; + timeRange?: Vapi.InsightTimeRangeWithStep; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.UpdateLineInsightFromCallTableDtoGroupBy; + /** These are the queries to run to generate the insight. */ + queries?: Vapi.UpdateLineInsightFromCallTableDtoQueriesItem[]; +} diff --git a/src/api/types/UpdateLineInsightFromCallTableDtoGroupBy.ts b/src/api/types/UpdateLineInsightFromCallTableDtoGroupBy.ts new file mode 100644 index 00000000..0790b239 --- /dev/null +++ b/src/api/types/UpdateLineInsightFromCallTableDtoGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const UpdateLineInsightFromCallTableDtoGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type UpdateLineInsightFromCallTableDtoGroupBy = + (typeof UpdateLineInsightFromCallTableDtoGroupBy)[keyof typeof UpdateLineInsightFromCallTableDtoGroupBy]; diff --git a/src/api/types/UpdateLineInsightFromCallTableDtoQueriesItem.ts b/src/api/types/UpdateLineInsightFromCallTableDtoQueriesItem.ts new file mode 100644 index 00000000..9d996d63 --- /dev/null +++ b/src/api/types/UpdateLineInsightFromCallTableDtoQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type UpdateLineInsightFromCallTableDtoQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/UpdateLmntCredentialDto.ts b/src/api/types/UpdateLmntCredentialDto.ts index 7f336574..b10ba058 100644 --- a/src/api/types/UpdateLmntCredentialDto.ts +++ b/src/api/types/UpdateLmntCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateLmntCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateMakeCredentialDto.ts b/src/api/types/UpdateMakeCredentialDto.ts index de6ece2e..30bd0240 100644 --- a/src/api/types/UpdateMakeCredentialDto.ts +++ b/src/api/types/UpdateMakeCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateMakeCredentialDto { /** Team ID */ diff --git a/src/api/types/UpdateMakeToolDto.ts b/src/api/types/UpdateMakeToolDto.ts index 4d38e9bf..d7d343fa 100644 --- a/src/api/types/UpdateMakeToolDto.ts +++ b/src/api/types/UpdateMakeToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateMakeToolDto { /** diff --git a/src/api/types/UpdateMakeToolDtoMessagesItem.ts b/src/api/types/UpdateMakeToolDtoMessagesItem.ts index f45d9e73..a5d21ddf 100644 --- a/src/api/types/UpdateMakeToolDtoMessagesItem.ts +++ b/src/api/types/UpdateMakeToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateMakeToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateMcpToolDto.ts b/src/api/types/UpdateMcpToolDto.ts index def8d41f..d05711f4 100644 --- a/src/api/types/UpdateMcpToolDto.ts +++ b/src/api/types/UpdateMcpToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateMcpToolDto { /** diff --git a/src/api/types/UpdateMcpToolDtoMessagesItem.ts b/src/api/types/UpdateMcpToolDtoMessagesItem.ts index 7ce2eb6b..907164ee 100644 --- a/src/api/types/UpdateMcpToolDtoMessagesItem.ts +++ b/src/api/types/UpdateMcpToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateMcpToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateMistralCredentialDto.ts b/src/api/types/UpdateMistralCredentialDto.ts index 36d12c9b..da16eff2 100644 --- a/src/api/types/UpdateMistralCredentialDto.ts +++ b/src/api/types/UpdateMistralCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateMistralCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateNeuphonicCredentialDto.ts b/src/api/types/UpdateNeuphonicCredentialDto.ts index 19bcf1f5..4921731f 100644 --- a/src/api/types/UpdateNeuphonicCredentialDto.ts +++ b/src/api/types/UpdateNeuphonicCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateNeuphonicCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateOpenAiCredentialDto.ts b/src/api/types/UpdateOpenAiCredentialDto.ts index f892b560..7e7e90a5 100644 --- a/src/api/types/UpdateOpenAiCredentialDto.ts +++ b/src/api/types/UpdateOpenAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateOpenAiCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateOpenRouterCredentialDto.ts b/src/api/types/UpdateOpenRouterCredentialDto.ts index cc406920..123ee335 100644 --- a/src/api/types/UpdateOpenRouterCredentialDto.ts +++ b/src/api/types/UpdateOpenRouterCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateOpenRouterCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateOrgDto.ts b/src/api/types/UpdateOrgDto.ts index 902b57c1..29845afb 100644 --- a/src/api/types/UpdateOrgDto.ts +++ b/src/api/types/UpdateOrgDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateOrgDto { /** diff --git a/src/api/types/UpdateOrgDtoChannel.ts b/src/api/types/UpdateOrgDtoChannel.ts index 7c62d22a..aadfbcb2 100644 --- a/src/api/types/UpdateOrgDtoChannel.ts +++ b/src/api/types/UpdateOrgDtoChannel.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the channel of the org. There is the cluster the API traffic for the org will be directed. - */ -export type UpdateOrgDtoChannel = "default" | "weekly"; +/** This is the channel of the org. There is the cluster the API traffic for the org will be directed. */ export const UpdateOrgDtoChannel = { Default: "default", Weekly: "weekly", } as const; +export type UpdateOrgDtoChannel = (typeof UpdateOrgDtoChannel)[keyof typeof UpdateOrgDtoChannel]; diff --git a/src/api/types/UpdateOutputToolDto.ts b/src/api/types/UpdateOutputToolDto.ts index 738ea2b6..e73c5867 100644 --- a/src/api/types/UpdateOutputToolDto.ts +++ b/src/api/types/UpdateOutputToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateOutputToolDto { /** diff --git a/src/api/types/UpdateOutputToolDtoMessagesItem.ts b/src/api/types/UpdateOutputToolDtoMessagesItem.ts index c6a82763..34900c89 100644 --- a/src/api/types/UpdateOutputToolDtoMessagesItem.ts +++ b/src/api/types/UpdateOutputToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateOutputToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdatePerplexityAiCredentialDto.ts b/src/api/types/UpdatePerplexityAiCredentialDto.ts index df3971a6..8af15106 100644 --- a/src/api/types/UpdatePerplexityAiCredentialDto.ts +++ b/src/api/types/UpdatePerplexityAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdatePerplexityAiCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdatePieInsightFromCallTableDto.ts b/src/api/types/UpdatePieInsightFromCallTableDto.ts new file mode 100644 index 00000000..02747cfc --- /dev/null +++ b/src/api/types/UpdatePieInsightFromCallTableDto.ts @@ -0,0 +1,36 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface UpdatePieInsightFromCallTableDto { + /** This is the name of the Insight. */ + name?: string; + type: "pie"; + /** + * 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. + */ + formulas?: Vapi.InsightFormula[]; + timeRange?: Vapi.InsightTimeRange; + /** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ + groupBy?: Vapi.UpdatePieInsightFromCallTableDtoGroupBy; + /** These are the queries to run to generate the insight. */ + queries?: Vapi.UpdatePieInsightFromCallTableDtoQueriesItem[]; +} diff --git a/src/api/types/UpdatePieInsightFromCallTableDtoGroupBy.ts b/src/api/types/UpdatePieInsightFromCallTableDtoGroupBy.ts new file mode 100644 index 00000000..079fd01f --- /dev/null +++ b/src/api/types/UpdatePieInsightFromCallTableDtoGroupBy.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * This is the group by column for the insight when table is `call`. + * These are the columns to group the results by. + * All results are grouped by the time range step by default. + */ +export const UpdatePieInsightFromCallTableDtoGroupBy = { + AssistantId: "assistantId", + WorkflowId: "workflowId", + SquadId: "squadId", + PhoneNumberId: "phoneNumberId", + Type: "type", + EndedReason: "endedReason", + CampaignId: "campaignId", + ArtifactStructuredOutputsOutputId: "artifact.structuredOutputs[OutputID]", +} as const; +export type UpdatePieInsightFromCallTableDtoGroupBy = + (typeof UpdatePieInsightFromCallTableDtoGroupBy)[keyof typeof UpdatePieInsightFromCallTableDtoGroupBy]; diff --git a/src/api/types/UpdatePieInsightFromCallTableDtoQueriesItem.ts b/src/api/types/UpdatePieInsightFromCallTableDtoQueriesItem.ts new file mode 100644 index 00000000..388a37a5 --- /dev/null +++ b/src/api/types/UpdatePieInsightFromCallTableDtoQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type UpdatePieInsightFromCallTableDtoQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/UpdatePlayHtCredentialDto.ts b/src/api/types/UpdatePlayHtCredentialDto.ts index 5504e71a..4737e34c 100644 --- a/src/api/types/UpdatePlayHtCredentialDto.ts +++ b/src/api/types/UpdatePlayHtCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdatePlayHtCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateQueryToolDto.ts b/src/api/types/UpdateQueryToolDto.ts index 0a95c736..0e3601c4 100644 --- a/src/api/types/UpdateQueryToolDto.ts +++ b/src/api/types/UpdateQueryToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateQueryToolDto { /** diff --git a/src/api/types/UpdateQueryToolDtoMessagesItem.ts b/src/api/types/UpdateQueryToolDtoMessagesItem.ts index 5840a200..e13684e0 100644 --- a/src/api/types/UpdateQueryToolDtoMessagesItem.ts +++ b/src/api/types/UpdateQueryToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateQueryToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateRimeAiCredentialDto.ts b/src/api/types/UpdateRimeAiCredentialDto.ts index 39192bc0..22387aad 100644 --- a/src/api/types/UpdateRimeAiCredentialDto.ts +++ b/src/api/types/UpdateRimeAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateRimeAiCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateRunpodCredentialDto.ts b/src/api/types/UpdateRunpodCredentialDto.ts index 284e4c77..3402d484 100644 --- a/src/api/types/UpdateRunpodCredentialDto.ts +++ b/src/api/types/UpdateRunpodCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateRunpodCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateS3CredentialDto.ts b/src/api/types/UpdateS3CredentialDto.ts index 1f1b9b86..91c60ef6 100644 --- a/src/api/types/UpdateS3CredentialDto.ts +++ b/src/api/types/UpdateS3CredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateS3CredentialDto { /** AWS access key ID. */ diff --git a/src/api/types/UpdateSlackOAuth2AuthorizationCredentialDto.ts b/src/api/types/UpdateSlackOAuth2AuthorizationCredentialDto.ts index 42e53358..232529a9 100644 --- a/src/api/types/UpdateSlackOAuth2AuthorizationCredentialDto.ts +++ b/src/api/types/UpdateSlackOAuth2AuthorizationCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateSlackOAuth2AuthorizationCredentialDto { /** The authorization ID for the OAuth2 authorization */ diff --git a/src/api/types/UpdateSlackSendMessageToolDto.ts b/src/api/types/UpdateSlackSendMessageToolDto.ts index a18e60d6..92230f11 100644 --- a/src/api/types/UpdateSlackSendMessageToolDto.ts +++ b/src/api/types/UpdateSlackSendMessageToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateSlackSendMessageToolDto { /** diff --git a/src/api/types/UpdateSlackSendMessageToolDtoMessagesItem.ts b/src/api/types/UpdateSlackSendMessageToolDtoMessagesItem.ts index 55075653..8ed115a6 100644 --- a/src/api/types/UpdateSlackSendMessageToolDtoMessagesItem.ts +++ b/src/api/types/UpdateSlackSendMessageToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateSlackSendMessageToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateSmallestAiCredentialDto.ts b/src/api/types/UpdateSmallestAiCredentialDto.ts index e261d600..4fa63094 100644 --- a/src/api/types/UpdateSmallestAiCredentialDto.ts +++ b/src/api/types/UpdateSmallestAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateSmallestAiCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateSmsToolDto.ts b/src/api/types/UpdateSmsToolDto.ts index f3edce3d..663718e3 100644 --- a/src/api/types/UpdateSmsToolDto.ts +++ b/src/api/types/UpdateSmsToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateSmsToolDto { /** diff --git a/src/api/types/UpdateSmsToolDtoMessagesItem.ts b/src/api/types/UpdateSmsToolDtoMessagesItem.ts index c85537ff..4bb9aa3c 100644 --- a/src/api/types/UpdateSmsToolDtoMessagesItem.ts +++ b/src/api/types/UpdateSmsToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateSmsToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateSpeechmaticsCredentialDto.ts b/src/api/types/UpdateSpeechmaticsCredentialDto.ts index fbc01687..2282b0bb 100644 --- a/src/api/types/UpdateSpeechmaticsCredentialDto.ts +++ b/src/api/types/UpdateSpeechmaticsCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateSpeechmaticsCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateSupabaseCredentialDto.ts b/src/api/types/UpdateSupabaseCredentialDto.ts index 4ac48fdb..7eddb018 100644 --- a/src/api/types/UpdateSupabaseCredentialDto.ts +++ b/src/api/types/UpdateSupabaseCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateSupabaseCredentialDto { /** This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order. */ diff --git a/src/api/types/UpdateTavusCredentialDto.ts b/src/api/types/UpdateTavusCredentialDto.ts index 24c83d1e..486c0fe5 100644 --- a/src/api/types/UpdateTavusCredentialDto.ts +++ b/src/api/types/UpdateTavusCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateTavusCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateTelnyxPhoneNumberDto.ts b/src/api/types/UpdateTelnyxPhoneNumberDto.ts index 251a4fd1..6307737d 100644 --- a/src/api/types/UpdateTelnyxPhoneNumberDto.ts +++ b/src/api/types/UpdateTelnyxPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTelnyxPhoneNumberDto { /** diff --git a/src/api/types/UpdateTelnyxPhoneNumberDtoFallbackDestination.ts b/src/api/types/UpdateTelnyxPhoneNumberDtoFallbackDestination.ts index e0fc1060..8c74c478 100644 --- a/src/api/types/UpdateTelnyxPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/UpdateTelnyxPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/UpdateTelnyxPhoneNumberDtoHooksItem.ts b/src/api/types/UpdateTelnyxPhoneNumberDtoHooksItem.ts index 6dbdd151..fd19eddd 100644 --- a/src/api/types/UpdateTelnyxPhoneNumberDtoHooksItem.ts +++ b/src/api/types/UpdateTelnyxPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateTelnyxPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/UpdateTestSuiteDto.ts b/src/api/types/UpdateTestSuiteDto.ts index fb339ab0..edc8a08f 100644 --- a/src/api/types/UpdateTestSuiteDto.ts +++ b/src/api/types/UpdateTestSuiteDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTestSuiteDto { /** This is the name of the test suite. */ diff --git a/src/api/types/UpdateTestSuiteRunDto.ts b/src/api/types/UpdateTestSuiteRunDto.ts index 00dc2579..f34d9bb0 100644 --- a/src/api/types/UpdateTestSuiteRunDto.ts +++ b/src/api/types/UpdateTestSuiteRunDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateTestSuiteRunDto { /** This is the name of the test suite run. */ diff --git a/src/api/types/UpdateTestSuiteTestChatDto.ts b/src/api/types/UpdateTestSuiteTestChatDto.ts index 630c78b5..8efa3311 100644 --- a/src/api/types/UpdateTestSuiteTestChatDto.ts +++ b/src/api/types/UpdateTestSuiteTestChatDto.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTestSuiteTestChatDto { /** These are the scorers used to evaluate the test. */ scorers?: Vapi.TestSuiteTestScorerAi[]; /** This is the type of the test, which must be chat. */ - type?: "chat"; + type?: Vapi.UpdateTestSuiteTestChatDtoType; /** This is the name of the test. */ name?: string; /** This is the script to be used for the chat test. */ diff --git a/src/api/types/UpdateTestSuiteTestChatDtoType.ts b/src/api/types/UpdateTestSuiteTestChatDtoType.ts new file mode 100644 index 00000000..166fa134 --- /dev/null +++ b/src/api/types/UpdateTestSuiteTestChatDtoType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the test, which must be chat. */ +export const UpdateTestSuiteTestChatDtoType = { + Chat: "chat", +} as const; +export type UpdateTestSuiteTestChatDtoType = + (typeof UpdateTestSuiteTestChatDtoType)[keyof typeof UpdateTestSuiteTestChatDtoType]; diff --git a/src/api/types/UpdateTestSuiteTestVoiceDto.ts b/src/api/types/UpdateTestSuiteTestVoiceDto.ts index 5d131ea6..71660e43 100644 --- a/src/api/types/UpdateTestSuiteTestVoiceDto.ts +++ b/src/api/types/UpdateTestSuiteTestVoiceDto.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTestSuiteTestVoiceDto { /** These are the scorers used to evaluate the test. */ scorers?: Vapi.TestSuiteTestScorerAi[]; /** This is the type of the test, which must be voice. */ - type?: "voice"; + type?: Vapi.UpdateTestSuiteTestVoiceDtoType; /** This is the name of the test. */ name?: string; /** This is the script to be used for the voice test. */ diff --git a/src/api/types/UpdateTestSuiteTestVoiceDtoType.ts b/src/api/types/UpdateTestSuiteTestVoiceDtoType.ts new file mode 100644 index 00000000..b4747703 --- /dev/null +++ b/src/api/types/UpdateTestSuiteTestVoiceDtoType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of the test, which must be voice. */ +export const UpdateTestSuiteTestVoiceDtoType = { + Voice: "voice", +} as const; +export type UpdateTestSuiteTestVoiceDtoType = + (typeof UpdateTestSuiteTestVoiceDtoType)[keyof typeof UpdateTestSuiteTestVoiceDtoType]; diff --git a/src/api/types/UpdateTextEditorToolDto.ts b/src/api/types/UpdateTextEditorToolDto.ts index 2c015bc8..ff4f649d 100644 --- a/src/api/types/UpdateTextEditorToolDto.ts +++ b/src/api/types/UpdateTextEditorToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTextEditorToolDto { /** @@ -12,7 +10,7 @@ export interface UpdateTextEditorToolDto { */ messages?: Vapi.UpdateTextEditorToolDtoMessagesItem[]; /** The sub type of tool. */ - subType?: "text_editor_20241022"; + subType?: Vapi.UpdateTextEditorToolDtoSubType; /** * This is the server where a `tool-calls` webhook will be sent. * @@ -106,5 +104,5 @@ export interface UpdateTextEditorToolDto { */ rejectionPlan?: Vapi.ToolRejectionPlan; /** The name of the tool, fixed to 'str_replace_editor' */ - name?: "str_replace_editor"; + name?: Vapi.UpdateTextEditorToolDtoName; } diff --git a/src/api/types/UpdateTextEditorToolDtoMessagesItem.ts b/src/api/types/UpdateTextEditorToolDtoMessagesItem.ts index 86d9e1d3..60a7bfca 100644 --- a/src/api/types/UpdateTextEditorToolDtoMessagesItem.ts +++ b/src/api/types/UpdateTextEditorToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateTextEditorToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateTextEditorToolDtoName.ts b/src/api/types/UpdateTextEditorToolDtoName.ts new file mode 100644 index 00000000..2c7d53b8 --- /dev/null +++ b/src/api/types/UpdateTextEditorToolDtoName.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The name of the tool, fixed to 'str_replace_editor' */ +export const UpdateTextEditorToolDtoName = { + StrReplaceEditor: "str_replace_editor", +} as const; +export type UpdateTextEditorToolDtoName = + (typeof UpdateTextEditorToolDtoName)[keyof typeof UpdateTextEditorToolDtoName]; diff --git a/src/api/types/UpdateTextEditorToolDtoSubType.ts b/src/api/types/UpdateTextEditorToolDtoSubType.ts new file mode 100644 index 00000000..6b3019f6 --- /dev/null +++ b/src/api/types/UpdateTextEditorToolDtoSubType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The sub type of tool. */ +export const UpdateTextEditorToolDtoSubType = { + TextEditor20241022: "text_editor_20241022", +} as const; +export type UpdateTextEditorToolDtoSubType = + (typeof UpdateTextEditorToolDtoSubType)[keyof typeof UpdateTextEditorToolDtoSubType]; diff --git a/src/api/types/UpdateTextInsightFromCallTableDto.ts b/src/api/types/UpdateTextInsightFromCallTableDto.ts new file mode 100644 index 00000000..7e27ca7c --- /dev/null +++ b/src/api/types/UpdateTextInsightFromCallTableDto.ts @@ -0,0 +1,33 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export interface UpdateTextInsightFromCallTableDto { + /** This is the name of the Insight. */ + name?: string; + type: "text"; + /** + * 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. + */ + formula?: Record; + timeRange?: Vapi.InsightTimeRange; + /** + * 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 + */ + queries?: Vapi.UpdateTextInsightFromCallTableDtoQueriesItem[]; +} diff --git a/src/api/types/UpdateTextInsightFromCallTableDtoQueriesItem.ts b/src/api/types/UpdateTextInsightFromCallTableDtoQueriesItem.ts new file mode 100644 index 00000000..86700593 --- /dev/null +++ b/src/api/types/UpdateTextInsightFromCallTableDtoQueriesItem.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; + +export type UpdateTextInsightFromCallTableDtoQueriesItem = + | Vapi.JsonQueryOnCallTableWithStringTypeColumn + | Vapi.JsonQueryOnCallTableWithNumberTypeColumn + | Vapi.JsonQueryOnCallTableWithStructuredOutputColumn; diff --git a/src/api/types/UpdateTogetherAiCredentialDto.ts b/src/api/types/UpdateTogetherAiCredentialDto.ts index 397b8bd4..e4bf69ee 100644 --- a/src/api/types/UpdateTogetherAiCredentialDto.ts +++ b/src/api/types/UpdateTogetherAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateTogetherAiCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateTokenDto.ts b/src/api/types/UpdateTokenDto.ts index efb9c962..fd68acfc 100644 --- a/src/api/types/UpdateTokenDto.ts +++ b/src/api/types/UpdateTokenDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTokenDto { /** This is the tag for the token. It represents its scope. */ diff --git a/src/api/types/UpdateTokenDtoTag.ts b/src/api/types/UpdateTokenDtoTag.ts index 1115c9ed..08e8aed5 100644 --- a/src/api/types/UpdateTokenDtoTag.ts +++ b/src/api/types/UpdateTokenDtoTag.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the tag for the token. It represents its scope. - */ -export type UpdateTokenDtoTag = "private" | "public"; +/** This is the tag for the token. It represents its scope. */ export const UpdateTokenDtoTag = { Private: "private", Public: "public", } as const; +export type UpdateTokenDtoTag = (typeof UpdateTokenDtoTag)[keyof typeof UpdateTokenDtoTag]; diff --git a/src/api/types/UpdateToolTemplateDto.ts b/src/api/types/UpdateToolTemplateDto.ts index c25e71c6..9d231b32 100644 --- a/src/api/types/UpdateToolTemplateDto.ts +++ b/src/api/types/UpdateToolTemplateDto.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateToolTemplateDto { details?: Vapi.UpdateToolTemplateDtoDetails; providerDetails?: Vapi.UpdateToolTemplateDtoProviderDetails; metadata?: Vapi.ToolTemplateMetadata; visibility?: Vapi.UpdateToolTemplateDtoVisibility; - type: "tool"; + type: Vapi.UpdateToolTemplateDtoType; /** The name of the template. This is just for your own reference. */ name?: string; provider?: Vapi.UpdateToolTemplateDtoProvider; diff --git a/src/api/types/UpdateToolTemplateDtoDetails.ts b/src/api/types/UpdateToolTemplateDtoDetails.ts index 05af9341..f723fbe2 100644 --- a/src/api/types/UpdateToolTemplateDtoDetails.ts +++ b/src/api/types/UpdateToolTemplateDtoDetails.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateToolTemplateDtoDetails = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/UpdateToolTemplateDtoProvider.ts b/src/api/types/UpdateToolTemplateDtoProvider.ts index c7f319b2..7e8f360a 100644 --- a/src/api/types/UpdateToolTemplateDtoProvider.ts +++ b/src/api/types/UpdateToolTemplateDtoProvider.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateToolTemplateDtoProvider = "make" | "gohighlevel" | "function"; export const UpdateToolTemplateDtoProvider = { Make: "make", Gohighlevel: "gohighlevel", Function: "function", } as const; +export type UpdateToolTemplateDtoProvider = + (typeof UpdateToolTemplateDtoProvider)[keyof typeof UpdateToolTemplateDtoProvider]; diff --git a/src/api/types/UpdateToolTemplateDtoProviderDetails.ts b/src/api/types/UpdateToolTemplateDtoProviderDetails.ts index e925a1b7..871b55f3 100644 --- a/src/api/types/UpdateToolTemplateDtoProviderDetails.ts +++ b/src/api/types/UpdateToolTemplateDtoProviderDetails.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateToolTemplateDtoProviderDetails = | Vapi.MakeToolProviderDetails diff --git a/src/api/types/UpdateToolTemplateDtoType.ts b/src/api/types/UpdateToolTemplateDtoType.ts new file mode 100644 index 00000000..cc76ad5c --- /dev/null +++ b/src/api/types/UpdateToolTemplateDtoType.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const UpdateToolTemplateDtoType = { + Tool: "tool", +} as const; +export type UpdateToolTemplateDtoType = (typeof UpdateToolTemplateDtoType)[keyof typeof UpdateToolTemplateDtoType]; diff --git a/src/api/types/UpdateToolTemplateDtoVisibility.ts b/src/api/types/UpdateToolTemplateDtoVisibility.ts index 62bb1951..6a4c5e9f 100644 --- a/src/api/types/UpdateToolTemplateDtoVisibility.ts +++ b/src/api/types/UpdateToolTemplateDtoVisibility.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateToolTemplateDtoVisibility = "public" | "private"; export const UpdateToolTemplateDtoVisibility = { Public: "public", Private: "private", } as const; +export type UpdateToolTemplateDtoVisibility = + (typeof UpdateToolTemplateDtoVisibility)[keyof typeof UpdateToolTemplateDtoVisibility]; diff --git a/src/api/types/UpdateTransferCallToolDto.ts b/src/api/types/UpdateTransferCallToolDto.ts index f23d1fb6..5f5670ac 100644 --- a/src/api/types/UpdateTransferCallToolDto.ts +++ b/src/api/types/UpdateTransferCallToolDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTransferCallToolDto { /** diff --git a/src/api/types/UpdateTransferCallToolDtoDestinationsItem.ts b/src/api/types/UpdateTransferCallToolDtoDestinationsItem.ts index d634d4fc..d088abd4 100644 --- a/src/api/types/UpdateTransferCallToolDtoDestinationsItem.ts +++ b/src/api/types/UpdateTransferCallToolDtoDestinationsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateTransferCallToolDtoDestinationsItem = | Vapi.TransferDestinationAssistant diff --git a/src/api/types/UpdateTransferCallToolDtoMessagesItem.ts b/src/api/types/UpdateTransferCallToolDtoMessagesItem.ts index e4600537..fe8a62f5 100644 --- a/src/api/types/UpdateTransferCallToolDtoMessagesItem.ts +++ b/src/api/types/UpdateTransferCallToolDtoMessagesItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateTransferCallToolDtoMessagesItem = | Vapi.ToolMessageStart diff --git a/src/api/types/UpdateTrieveCredentialDto.ts b/src/api/types/UpdateTrieveCredentialDto.ts index f020c8d9..f9dcc0f9 100644 --- a/src/api/types/UpdateTrieveCredentialDto.ts +++ b/src/api/types/UpdateTrieveCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateTrieveCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateTrieveKnowledgeBaseDto.ts b/src/api/types/UpdateTrieveKnowledgeBaseDto.ts index 13d3956c..19abbb9a 100644 --- a/src/api/types/UpdateTrieveKnowledgeBaseDto.ts +++ b/src/api/types/UpdateTrieveKnowledgeBaseDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTrieveKnowledgeBaseDto { /** This is the name of the knowledge base. */ diff --git a/src/api/types/UpdateTwilioCredentialDto.ts b/src/api/types/UpdateTwilioCredentialDto.ts index 861efa41..15ff2fbd 100644 --- a/src/api/types/UpdateTwilioCredentialDto.ts +++ b/src/api/types/UpdateTwilioCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateTwilioCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateTwilioPhoneNumberDto.ts b/src/api/types/UpdateTwilioPhoneNumberDto.ts index 9bcbcf63..56889f5a 100644 --- a/src/api/types/UpdateTwilioPhoneNumberDto.ts +++ b/src/api/types/UpdateTwilioPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateTwilioPhoneNumberDto { /** diff --git a/src/api/types/UpdateTwilioPhoneNumberDtoFallbackDestination.ts b/src/api/types/UpdateTwilioPhoneNumberDtoFallbackDestination.ts index 31fcf42d..191fb29f 100644 --- a/src/api/types/UpdateTwilioPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/UpdateTwilioPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/UpdateTwilioPhoneNumberDtoHooksItem.ts b/src/api/types/UpdateTwilioPhoneNumberDtoHooksItem.ts index 976af5d0..f7618998 100644 --- a/src/api/types/UpdateTwilioPhoneNumberDtoHooksItem.ts +++ b/src/api/types/UpdateTwilioPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateTwilioPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/UpdateUserRoleDto.ts b/src/api/types/UpdateUserRoleDto.ts index 27329e3f..2903051b 100644 --- a/src/api/types/UpdateUserRoleDto.ts +++ b/src/api/types/UpdateUserRoleDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateUserRoleDto { userId: string; diff --git a/src/api/types/UpdateUserRoleDtoRole.ts b/src/api/types/UpdateUserRoleDtoRole.ts index 17990fe0..d4c9dfcc 100644 --- a/src/api/types/UpdateUserRoleDtoRole.ts +++ b/src/api/types/UpdateUserRoleDtoRole.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateUserRoleDtoRole = "admin" | "editor" | "viewer"; export const UpdateUserRoleDtoRole = { Admin: "admin", Editor: "editor", Viewer: "viewer", } as const; +export type UpdateUserRoleDtoRole = (typeof UpdateUserRoleDtoRole)[keyof typeof UpdateUserRoleDtoRole]; diff --git a/src/api/types/UpdateVapiPhoneNumberDto.ts b/src/api/types/UpdateVapiPhoneNumberDto.ts index 3a8a3c08..31deb632 100644 --- a/src/api/types/UpdateVapiPhoneNumberDto.ts +++ b/src/api/types/UpdateVapiPhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateVapiPhoneNumberDto { /** diff --git a/src/api/types/UpdateVapiPhoneNumberDtoFallbackDestination.ts b/src/api/types/UpdateVapiPhoneNumberDtoFallbackDestination.ts index d5ebaab4..b742affc 100644 --- a/src/api/types/UpdateVapiPhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/UpdateVapiPhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/UpdateVapiPhoneNumberDtoHooksItem.ts b/src/api/types/UpdateVapiPhoneNumberDtoHooksItem.ts index 161f6791..b88f634a 100644 --- a/src/api/types/UpdateVapiPhoneNumberDtoHooksItem.ts +++ b/src/api/types/UpdateVapiPhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateVapiPhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/UpdateVonageCredentialDto.ts b/src/api/types/UpdateVonageCredentialDto.ts index fde19f37..21f46f99 100644 --- a/src/api/types/UpdateVonageCredentialDto.ts +++ b/src/api/types/UpdateVonageCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateVonageCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/UpdateVonagePhoneNumberDto.ts b/src/api/types/UpdateVonagePhoneNumberDto.ts index 1e626331..12cf5f60 100644 --- a/src/api/types/UpdateVonagePhoneNumberDto.ts +++ b/src/api/types/UpdateVonagePhoneNumberDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateVonagePhoneNumberDto { /** diff --git a/src/api/types/UpdateVonagePhoneNumberDtoFallbackDestination.ts b/src/api/types/UpdateVonagePhoneNumberDtoFallbackDestination.ts index d05d69a5..650f791e 100644 --- a/src/api/types/UpdateVonagePhoneNumberDtoFallbackDestination.ts +++ b/src/api/types/UpdateVonagePhoneNumberDtoFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/UpdateVonagePhoneNumberDtoHooksItem.ts b/src/api/types/UpdateVonagePhoneNumberDtoHooksItem.ts index eb80ed71..8ca998c6 100644 --- a/src/api/types/UpdateVonagePhoneNumberDtoHooksItem.ts +++ b/src/api/types/UpdateVonagePhoneNumberDtoHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateVonagePhoneNumberDtoHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/UpdateWebhookCredentialDto.ts b/src/api/types/UpdateWebhookCredentialDto.ts index f979ef49..e6e6d92f 100644 --- a/src/api/types/UpdateWebhookCredentialDto.ts +++ b/src/api/types/UpdateWebhookCredentialDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateWebhookCredentialDto { /** This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. */ diff --git a/src/api/types/UpdateWebhookCredentialDtoAuthenticationPlan.ts b/src/api/types/UpdateWebhookCredentialDtoAuthenticationPlan.ts index 8a2bf9a5..b8b34d9a 100644 --- a/src/api/types/UpdateWebhookCredentialDtoAuthenticationPlan.ts +++ b/src/api/types/UpdateWebhookCredentialDtoAuthenticationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. diff --git a/src/api/types/UpdateWorkflowDto.ts b/src/api/types/UpdateWorkflowDto.ts index 792e7ebe..ab7114c8 100644 --- a/src/api/types/UpdateWorkflowDto.ts +++ b/src/api/types/UpdateWorkflowDto.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface UpdateWorkflowDto { nodes?: Vapi.UpdateWorkflowDtoNodesItem[]; diff --git a/src/api/types/UpdateWorkflowDtoBackgroundSound.ts b/src/api/types/UpdateWorkflowDtoBackgroundSound.ts index 2feb0050..8244482d 100644 --- a/src/api/types/UpdateWorkflowDtoBackgroundSound.ts +++ b/src/api/types/UpdateWorkflowDtoBackgroundSound.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. diff --git a/src/api/types/UpdateWorkflowDtoBackgroundSoundZero.ts b/src/api/types/UpdateWorkflowDtoBackgroundSoundZero.ts index a881636c..56821636 100644 --- a/src/api/types/UpdateWorkflowDtoBackgroundSoundZero.ts +++ b/src/api/types/UpdateWorkflowDtoBackgroundSoundZero.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UpdateWorkflowDtoBackgroundSoundZero = "off" | "office"; export const UpdateWorkflowDtoBackgroundSoundZero = { Off: "off", Office: "office", } as const; +export type UpdateWorkflowDtoBackgroundSoundZero = + (typeof UpdateWorkflowDtoBackgroundSoundZero)[keyof typeof UpdateWorkflowDtoBackgroundSoundZero]; diff --git a/src/api/types/UpdateWorkflowDtoCredentialsItem.ts b/src/api/types/UpdateWorkflowDtoCredentialsItem.ts index 3d16c22b..e1b74302 100644 --- a/src/api/types/UpdateWorkflowDtoCredentialsItem.ts +++ b/src/api/types/UpdateWorkflowDtoCredentialsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateWorkflowDtoCredentialsItem = | Vapi.CreateElevenLabsCredentialDto diff --git a/src/api/types/UpdateWorkflowDtoHooksItem.ts b/src/api/types/UpdateWorkflowDtoHooksItem.ts index 44ca0acc..597882a1 100644 --- a/src/api/types/UpdateWorkflowDtoHooksItem.ts +++ b/src/api/types/UpdateWorkflowDtoHooksItem.ts @@ -1,11 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateWorkflowDtoHooksItem = | Vapi.CallHookCallEnding | Vapi.CallHookAssistantSpeechInterrupted | Vapi.CallHookCustomerSpeechInterrupted - | Vapi.CallHookCustomerSpeechTimeout; + | Vapi.CallHookCustomerSpeechTimeout + | Vapi.CallHookModelResponseTimeout; diff --git a/src/api/types/UpdateWorkflowDtoModel.ts b/src/api/types/UpdateWorkflowDtoModel.ts index 3ccd984c..b336fbcb 100644 --- a/src/api/types/UpdateWorkflowDtoModel.ts +++ b/src/api/types/UpdateWorkflowDtoModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the model for the workflow. diff --git a/src/api/types/UpdateWorkflowDtoNodesItem.ts b/src/api/types/UpdateWorkflowDtoNodesItem.ts index 8e2fb631..42744123 100644 --- a/src/api/types/UpdateWorkflowDtoNodesItem.ts +++ b/src/api/types/UpdateWorkflowDtoNodesItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type UpdateWorkflowDtoNodesItem = Vapi.ConversationNode | Vapi.ToolNode; diff --git a/src/api/types/UpdateWorkflowDtoTranscriber.ts b/src/api/types/UpdateWorkflowDtoTranscriber.ts index a5376ce9..b2dd56ec 100644 --- a/src/api/types/UpdateWorkflowDtoTranscriber.ts +++ b/src/api/types/UpdateWorkflowDtoTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the transcriber for the workflow. diff --git a/src/api/types/UpdateWorkflowDtoVoice.ts b/src/api/types/UpdateWorkflowDtoVoice.ts index 4d3d8ece..93538fca 100644 --- a/src/api/types/UpdateWorkflowDtoVoice.ts +++ b/src/api/types/UpdateWorkflowDtoVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voice for the workflow. diff --git a/src/api/types/UpdateWorkflowDtoVoicemailDetection.ts b/src/api/types/UpdateWorkflowDtoVoicemailDetection.ts index 19ebd324..e753d28f 100644 --- a/src/api/types/UpdateWorkflowDtoVoicemailDetection.ts +++ b/src/api/types/UpdateWorkflowDtoVoicemailDetection.ts @@ -1,13 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voicemail detection plan for the workflow. */ export type UpdateWorkflowDtoVoicemailDetection = + | Vapi.UpdateWorkflowDtoVoicemailDetectionZero | Vapi.GoogleVoicemailDetectionPlan | Vapi.OpenAiVoicemailDetectionPlan | Vapi.TwilioVoicemailDetectionPlan diff --git a/src/api/types/UpdateWorkflowDtoVoicemailDetectionZero.ts b/src/api/types/UpdateWorkflowDtoVoicemailDetectionZero.ts new file mode 100644 index 00000000..ff21b264 --- /dev/null +++ b/src/api/types/UpdateWorkflowDtoVoicemailDetectionZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const UpdateWorkflowDtoVoicemailDetectionZero = { + Off: "off", +} as const; +export type UpdateWorkflowDtoVoicemailDetectionZero = + (typeof UpdateWorkflowDtoVoicemailDetectionZero)[keyof typeof UpdateWorkflowDtoVoicemailDetectionZero]; diff --git a/src/api/types/UpdateXAiCredentialDto.ts b/src/api/types/UpdateXAiCredentialDto.ts index 57acd17f..05034c35 100644 --- a/src/api/types/UpdateXAiCredentialDto.ts +++ b/src/api/types/UpdateXAiCredentialDto.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateXAiCredentialDto { /** This is not returned in the API. */ diff --git a/src/api/types/User.ts b/src/api/types/User.ts index c72139f2..ed525752 100644 --- a/src/api/types/User.ts +++ b/src/api/types/User.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface User { /** This is the unique identifier for the profile or user. */ diff --git a/src/api/types/UserMessage.ts b/src/api/types/UserMessage.ts index b88fc73f..18b4843e 100644 --- a/src/api/types/UserMessage.ts +++ b/src/api/types/UserMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UserMessage { /** The role of the user in the conversation. */ diff --git a/src/api/types/VapiCost.ts b/src/api/types/VapiCost.ts index 7b55b70b..fc46a8ae 100644 --- a/src/api/types/VapiCost.ts +++ b/src/api/types/VapiCost.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VapiCost { /** This is the type of cost, always 'vapi' for this class. */ - type: "vapi"; + type: Vapi.VapiCostType; /** This is the sub type of the cost. */ subType: Vapi.VapiCostSubType; /** This is the minutes of Vapi usage. This should match `call.endedAt` - `call.startedAt`. */ diff --git a/src/api/types/VapiCostSubType.ts b/src/api/types/VapiCostSubType.ts index a03c0ae2..9d315254 100644 --- a/src/api/types/VapiCostSubType.ts +++ b/src/api/types/VapiCostSubType.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the sub type of the cost. - */ -export type VapiCostSubType = "normal" | "overage"; +/** This is the sub type of the cost. */ export const VapiCostSubType = { Normal: "normal", Overage: "overage", } as const; +export type VapiCostSubType = (typeof VapiCostSubType)[keyof typeof VapiCostSubType]; diff --git a/src/api/types/VapiCostType.ts b/src/api/types/VapiCostType.ts new file mode 100644 index 00000000..7f2e09b0 --- /dev/null +++ b/src/api/types/VapiCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'vapi' for this class. */ +export const VapiCostType = { + Vapi: "vapi", +} as const; +export type VapiCostType = (typeof VapiCostType)[keyof typeof VapiCostType]; diff --git a/src/api/types/VapiModel.ts b/src/api/types/VapiModel.ts index 519ddfa9..20b40816 100644 --- a/src/api/types/VapiModel.ts +++ b/src/api/types/VapiModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VapiModel { /** This is the starting state for the conversation. */ @@ -21,7 +19,7 @@ export interface VapiModel { toolIds?: string[]; /** These are the options for the knowledge base. */ knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; - provider: "vapi"; + provider: Vapi.VapiModelProvider; /** This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. */ workflowId?: string; /** This is the workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. */ diff --git a/src/api/types/VapiModelProvider.ts b/src/api/types/VapiModelProvider.ts new file mode 100644 index 00000000..db9275ed --- /dev/null +++ b/src/api/types/VapiModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const VapiModelProvider = { + Vapi: "vapi", +} as const; +export type VapiModelProvider = (typeof VapiModelProvider)[keyof typeof VapiModelProvider]; diff --git a/src/api/types/VapiModelToolsItem.ts b/src/api/types/VapiModelToolsItem.ts index d0a4520a..d95300f2 100644 --- a/src/api/types/VapiModelToolsItem.ts +++ b/src/api/types/VapiModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type VapiModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/VapiPhoneNumber.ts b/src/api/types/VapiPhoneNumber.ts index accaa0e6..b74d0556 100644 --- a/src/api/types/VapiPhoneNumber.ts +++ b/src/api/types/VapiPhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VapiPhoneNumber { /** diff --git a/src/api/types/VapiPhoneNumberFallbackDestination.ts b/src/api/types/VapiPhoneNumberFallbackDestination.ts index 347501bd..e934929e 100644 --- a/src/api/types/VapiPhoneNumberFallbackDestination.ts +++ b/src/api/types/VapiPhoneNumberFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/VapiPhoneNumberHooksItem.ts b/src/api/types/VapiPhoneNumberHooksItem.ts index 25a4bb05..7849367a 100644 --- a/src/api/types/VapiPhoneNumberHooksItem.ts +++ b/src/api/types/VapiPhoneNumberHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type VapiPhoneNumberHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/VapiPhoneNumberStatus.ts b/src/api/types/VapiPhoneNumberStatus.ts index c0beb867..04e55ece 100644 --- a/src/api/types/VapiPhoneNumberStatus.ts +++ b/src/api/types/VapiPhoneNumberStatus.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the phone number. - */ -export type VapiPhoneNumberStatus = "active" | "activating" | "blocked"; +/** This is the status of the phone number. */ export const VapiPhoneNumberStatus = { Active: "active", Activating: "activating", Blocked: "blocked", } as const; +export type VapiPhoneNumberStatus = (typeof VapiPhoneNumberStatus)[keyof typeof VapiPhoneNumberStatus]; diff --git a/src/api/types/VapiSmartEndpointingPlan.ts b/src/api/types/VapiSmartEndpointingPlan.ts index 3e162363..f8e2cdcc 100644 --- a/src/api/types/VapiSmartEndpointingPlan.ts +++ b/src/api/types/VapiSmartEndpointingPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VapiSmartEndpointingPlan { /** This is the provider for the smart endpointing plan. */ diff --git a/src/api/types/VapiSmartEndpointingPlanProvider.ts b/src/api/types/VapiSmartEndpointingPlanProvider.ts index d76b8b70..a1ea84ff 100644 --- a/src/api/types/VapiSmartEndpointingPlanProvider.ts +++ b/src/api/types/VapiSmartEndpointingPlanProvider.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the provider for the smart endpointing plan. - */ -export type VapiSmartEndpointingPlanProvider = "vapi" | "livekit" | "custom-endpointing-model"; +/** This is the provider for the smart endpointing plan. */ export const VapiSmartEndpointingPlanProvider = { Vapi: "vapi", Livekit: "livekit", CustomEndpointingModel: "custom-endpointing-model", } as const; +export type VapiSmartEndpointingPlanProvider = + (typeof VapiSmartEndpointingPlanProvider)[keyof typeof VapiSmartEndpointingPlanProvider]; diff --git a/src/api/types/VapiVoice.ts b/src/api/types/VapiVoice.ts index e73bd216..667c75f2 100644 --- a/src/api/types/VapiVoice.ts +++ b/src/api/types/VapiVoice.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VapiVoice { /** This is the flag to toggle voice caching for the assistant. */ cachingEnabled?: boolean; /** This is the voice provider that will be used. */ - provider: "vapi"; + provider: Vapi.VapiVoiceProvider; /** The voices provided by Vapi */ voiceId: Vapi.VapiVoiceVoiceId; /** diff --git a/src/api/types/VapiVoiceProvider.ts b/src/api/types/VapiVoiceProvider.ts new file mode 100644 index 00000000..bd684883 --- /dev/null +++ b/src/api/types/VapiVoiceProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the voice provider that will be used. */ +export const VapiVoiceProvider = { + Vapi: "vapi", +} as const; +export type VapiVoiceProvider = (typeof VapiVoiceProvider)[keyof typeof VapiVoiceProvider]; diff --git a/src/api/types/VapiVoiceVoiceId.ts b/src/api/types/VapiVoiceVoiceId.ts index 4ced2545..c437386e 100644 --- a/src/api/types/VapiVoiceVoiceId.ts +++ b/src/api/types/VapiVoiceVoiceId.ts @@ -1,22 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The voices provided by Vapi - */ -export type VapiVoiceVoiceId = - | "Elliot" - | "Kylie" - | "Rohan" - | "Lily" - | "Savannah" - | "Hana" - | "Neha" - | "Cole" - | "Harry" - | "Paige" - | "Spencer"; +/** The voices provided by Vapi */ export const VapiVoiceVoiceId = { Elliot: "Elliot", Kylie: "Kylie", @@ -29,4 +13,7 @@ export const VapiVoiceVoiceId = { Harry: "Harry", Paige: "Paige", Spencer: "Spencer", + Leah: "Leah", + Tara: "Tara", } as const; +export type VapiVoiceVoiceId = (typeof VapiVoiceVoiceId)[keyof typeof VapiVoiceVoiceId]; diff --git a/src/api/types/VapiVoicemailDetectionPlan.ts b/src/api/types/VapiVoicemailDetectionPlan.ts index 918c8768..e4183796 100644 --- a/src/api/types/VapiVoicemailDetectionPlan.ts +++ b/src/api/types/VapiVoicemailDetectionPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VapiVoicemailDetectionPlan { /** @@ -18,7 +16,7 @@ export interface VapiVoicemailDetectionPlan { */ beepMaxAwaitSeconds?: number; /** This is the provider to use for voicemail detection. */ - provider: "vapi"; + provider: Vapi.VapiVoicemailDetectionPlanProvider; /** This is the backoff plan for the voicemail detection. */ backoffPlan?: Vapi.VoicemailDetectionBackoffPlan; /** diff --git a/src/api/types/VapiVoicemailDetectionPlanProvider.ts b/src/api/types/VapiVoicemailDetectionPlanProvider.ts new file mode 100644 index 00000000..896f6553 --- /dev/null +++ b/src/api/types/VapiVoicemailDetectionPlanProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider to use for voicemail detection. */ +export const VapiVoicemailDetectionPlanProvider = { + Vapi: "vapi", +} as const; +export type VapiVoicemailDetectionPlanProvider = + (typeof VapiVoicemailDetectionPlanProvider)[keyof typeof VapiVoicemailDetectionPlanProvider]; diff --git a/src/api/types/VapiVoicemailDetectionPlanType.ts b/src/api/types/VapiVoicemailDetectionPlanType.ts index a8c6b530..865f35b9 100644 --- a/src/api/types/VapiVoicemailDetectionPlanType.ts +++ b/src/api/types/VapiVoicemailDetectionPlanType.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the detection type to use for voicemail detection. @@ -8,8 +6,9 @@ * - 'transcript': Uses ASR/transcript-based detection * @default 'audio' (audio detection) */ -export type VapiVoicemailDetectionPlanType = "audio" | "transcript"; export const VapiVoicemailDetectionPlanType = { Audio: "audio", Transcript: "transcript", } as const; +export type VapiVoicemailDetectionPlanType = + (typeof VapiVoicemailDetectionPlanType)[keyof typeof VapiVoicemailDetectionPlanType]; diff --git a/src/api/types/VariableExtractionAlias.ts b/src/api/types/VariableExtractionAlias.ts index fd723963..c78571ee 100644 --- a/src/api/types/VariableExtractionAlias.ts +++ b/src/api/types/VariableExtractionAlias.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface VariableExtractionAlias { /** diff --git a/src/api/types/VariableExtractionPlan.ts b/src/api/types/VariableExtractionPlan.ts index 4163b2e0..0b52ef69 100644 --- a/src/api/types/VariableExtractionPlan.ts +++ b/src/api/types/VariableExtractionPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VariableExtractionPlan { /** diff --git a/src/api/types/VariableValueGroupBy.ts b/src/api/types/VariableValueGroupBy.ts index ce7396bb..f03c5aa2 100644 --- a/src/api/types/VariableValueGroupBy.ts +++ b/src/api/types/VariableValueGroupBy.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface VariableValueGroupBy { /** This is the key of the variable value to group by. */ diff --git a/src/api/types/VoiceCost.ts b/src/api/types/VoiceCost.ts index 7fe0979d..a71210ef 100644 --- a/src/api/types/VoiceCost.ts +++ b/src/api/types/VoiceCost.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface VoiceCost { /** This is the type of cost, always 'voice' for this class. */ - type: "voice"; + type: Vapi.VoiceCostType; /** * This is the voice that was used during the call. * diff --git a/src/api/types/VoiceCostType.ts b/src/api/types/VoiceCostType.ts new file mode 100644 index 00000000..1ff6fa2c --- /dev/null +++ b/src/api/types/VoiceCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'voice' for this class. */ +export const VoiceCostType = { + Voice: "voice", +} as const; +export type VoiceCostType = (typeof VoiceCostType)[keyof typeof VoiceCostType]; diff --git a/src/api/types/VoiceLibrary.ts b/src/api/types/VoiceLibrary.ts index 1c126033..874f0f10 100644 --- a/src/api/types/VoiceLibrary.ts +++ b/src/api/types/VoiceLibrary.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VoiceLibrary { /** This is the voice provider that will be used. */ diff --git a/src/api/types/VoiceLibraryGender.ts b/src/api/types/VoiceLibraryGender.ts index cc649328..abecdaf2 100644 --- a/src/api/types/VoiceLibraryGender.ts +++ b/src/api/types/VoiceLibraryGender.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The gender of the voice. - */ -export type VoiceLibraryGender = "male" | "female"; +/** The gender of the voice. */ export const VoiceLibraryGender = { Male: "male", Female: "female", } as const; +export type VoiceLibraryGender = (typeof VoiceLibraryGender)[keyof typeof VoiceLibraryGender]; diff --git a/src/api/types/VoiceLibraryVoiceResponse.ts b/src/api/types/VoiceLibraryVoiceResponse.ts index 0e3f0cfd..0383b1ee 100644 --- a/src/api/types/VoiceLibraryVoiceResponse.ts +++ b/src/api/types/VoiceLibraryVoiceResponse.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface VoiceLibraryVoiceResponse { voiceId: string; diff --git a/src/api/types/VoicemailDetectionBackoffPlan.ts b/src/api/types/VoicemailDetectionBackoffPlan.ts index d28100e2..00e208f1 100644 --- a/src/api/types/VoicemailDetectionBackoffPlan.ts +++ b/src/api/types/VoicemailDetectionBackoffPlan.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface VoicemailDetectionBackoffPlan { /** This is the number of seconds to wait before starting the first retry attempt. */ diff --git a/src/api/types/VoicemailDetectionCost.ts b/src/api/types/VoicemailDetectionCost.ts index 25daacd7..dc2de26d 100644 --- a/src/api/types/VoicemailDetectionCost.ts +++ b/src/api/types/VoicemailDetectionCost.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VoicemailDetectionCost { /** This is the type of cost, always 'voicemail-detection' for this class. */ - type: "voicemail-detection"; + type: Vapi.VoicemailDetectionCostType; /** This is the model that was used to perform the analysis. */ model: Record; /** This is the provider that was used to detect the voicemail. */ diff --git a/src/api/types/VoicemailDetectionCostProvider.ts b/src/api/types/VoicemailDetectionCostProvider.ts index 90d1781c..d68c73a4 100644 --- a/src/api/types/VoicemailDetectionCostProvider.ts +++ b/src/api/types/VoicemailDetectionCostProvider.ts @@ -1,14 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the provider that was used to detect the voicemail. - */ -export type VoicemailDetectionCostProvider = "twilio" | "google" | "openai" | "vapi"; +/** This is the provider that was used to detect the voicemail. */ export const VoicemailDetectionCostProvider = { Twilio: "twilio", Google: "google", Openai: "openai", Vapi: "vapi", } as const; +export type VoicemailDetectionCostProvider = + (typeof VoicemailDetectionCostProvider)[keyof typeof VoicemailDetectionCostProvider]; diff --git a/src/api/types/VoicemailDetectionCostType.ts b/src/api/types/VoicemailDetectionCostType.ts new file mode 100644 index 00000000..2c9f4df8 --- /dev/null +++ b/src/api/types/VoicemailDetectionCostType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the type of cost, always 'voicemail-detection' for this class. */ +export const VoicemailDetectionCostType = { + VoicemailDetection: "voicemail-detection", +} as const; +export type VoicemailDetectionCostType = (typeof VoicemailDetectionCostType)[keyof typeof VoicemailDetectionCostType]; diff --git a/src/api/types/VonageCredential.ts b/src/api/types/VonageCredential.ts index 62e3c857..b6f38080 100644 --- a/src/api/types/VonageCredential.ts +++ b/src/api/types/VonageCredential.ts @@ -1,11 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface VonageCredential { /** This is not returned in the API. */ vonageApplicationPrivateKey: string; - provider: "vonage"; + provider: Vapi.VonageCredentialProvider; /** This is not returned in the API. */ apiSecret: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/VonageCredentialProvider.ts b/src/api/types/VonageCredentialProvider.ts new file mode 100644 index 00000000..548b9ee6 --- /dev/null +++ b/src/api/types/VonageCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const VonageCredentialProvider = { + Vonage: "vonage", +} as const; +export type VonageCredentialProvider = (typeof VonageCredentialProvider)[keyof typeof VonageCredentialProvider]; diff --git a/src/api/types/VonagePhoneNumber.ts b/src/api/types/VonagePhoneNumber.ts index 88d97c8b..04fef748 100644 --- a/src/api/types/VonagePhoneNumber.ts +++ b/src/api/types/VonagePhoneNumber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface VonagePhoneNumber { /** diff --git a/src/api/types/VonagePhoneNumberFallbackDestination.ts b/src/api/types/VonagePhoneNumberFallbackDestination.ts index 2731adb3..01d2f8c7 100644 --- a/src/api/types/VonagePhoneNumberFallbackDestination.ts +++ b/src/api/types/VonagePhoneNumberFallbackDestination.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/types/VonagePhoneNumberHooksItem.ts b/src/api/types/VonagePhoneNumberHooksItem.ts index f1c51424..5d58010c 100644 --- a/src/api/types/VonagePhoneNumberHooksItem.ts +++ b/src/api/types/VonagePhoneNumberHooksItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type VonagePhoneNumberHooksItem = Vapi.PhoneNumberHookCallRinging | Vapi.PhoneNumberHookCallEnding; diff --git a/src/api/types/VonagePhoneNumberStatus.ts b/src/api/types/VonagePhoneNumberStatus.ts index f0773bb0..506363bc 100644 --- a/src/api/types/VonagePhoneNumberStatus.ts +++ b/src/api/types/VonagePhoneNumberStatus.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the status of the phone number. - */ -export type VonagePhoneNumberStatus = "active" | "activating" | "blocked"; +/** This is the status of the phone number. */ export const VonagePhoneNumberStatus = { Active: "active", Activating: "activating", Blocked: "blocked", } as const; +export type VonagePhoneNumberStatus = (typeof VonagePhoneNumberStatus)[keyof typeof VonagePhoneNumberStatus]; diff --git a/src/api/types/WebChat.ts b/src/api/types/WebChat.ts index 4528b07a..66716a5a 100644 --- a/src/api/types/WebChat.ts +++ b/src/api/types/WebChat.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface WebChat { /** This is the unique identifier for the chat. */ diff --git a/src/api/types/WebChatOutputItem.ts b/src/api/types/WebChatOutputItem.ts index 440930a9..cf6e4c93 100644 --- a/src/api/types/WebChatOutputItem.ts +++ b/src/api/types/WebChatOutputItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type WebChatOutputItem = | Vapi.SystemMessage diff --git a/src/api/types/WebhookCredential.ts b/src/api/types/WebhookCredential.ts index 62f0c838..b878310d 100644 --- a/src/api/types/WebhookCredential.ts +++ b/src/api/types/WebhookCredential.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface WebhookCredential { - provider: "webhook"; + provider: Vapi.WebhookCredentialProvider; /** This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. */ authenticationPlan: Vapi.WebhookCredentialAuthenticationPlan; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/WebhookCredentialAuthenticationPlan.ts b/src/api/types/WebhookCredentialAuthenticationPlan.ts index 0d730bff..5f0abd3e 100644 --- a/src/api/types/WebhookCredentialAuthenticationPlan.ts +++ b/src/api/types/WebhookCredentialAuthenticationPlan.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication. diff --git a/src/api/types/WebhookCredentialProvider.ts b/src/api/types/WebhookCredentialProvider.ts new file mode 100644 index 00000000..aa417b18 --- /dev/null +++ b/src/api/types/WebhookCredentialProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const WebhookCredentialProvider = { + Webhook: "webhook", +} as const; +export type WebhookCredentialProvider = (typeof WebhookCredentialProvider)[keyof typeof WebhookCredentialProvider]; diff --git a/src/api/types/Workflow.ts b/src/api/types/Workflow.ts index 3b5c56b7..4203ce9c 100644 --- a/src/api/types/Workflow.ts +++ b/src/api/types/Workflow.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface Workflow { nodes: Vapi.WorkflowNodesItem[]; diff --git a/src/api/types/WorkflowAnthropicModel.ts b/src/api/types/WorkflowAnthropicModel.ts index 24246c62..7151a60b 100644 --- a/src/api/types/WorkflowAnthropicModel.ts +++ b/src/api/types/WorkflowAnthropicModel.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface WorkflowAnthropicModel { /** This is the provider of the model (`anthropic`). */ - provider: "anthropic"; + provider: Vapi.WorkflowAnthropicModelProvider; /** This is the specific model that will be used. */ model: Vapi.WorkflowAnthropicModelModel; /** diff --git a/src/api/types/WorkflowAnthropicModelModel.ts b/src/api/types/WorkflowAnthropicModelModel.ts index f0eeeec9..8da91f09 100644 --- a/src/api/types/WorkflowAnthropicModelModel.ts +++ b/src/api/types/WorkflowAnthropicModelModel.ts @@ -1,22 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the specific model that will be used. - */ -export type WorkflowAnthropicModelModel = - | "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-sonnet-4-20250514" - | "claude-sonnet-4-5-20250929" - | "claude-haiku-4-5-20251001"; +/** This is the specific model that will be used. */ export const WorkflowAnthropicModelModel = { Claude3Opus20240229: "claude-3-opus-20240229", Claude3Sonnet20240229: "claude-3-sonnet-20240229", @@ -30,3 +14,5 @@ export const WorkflowAnthropicModelModel = { ClaudeSonnet4520250929: "claude-sonnet-4-5-20250929", ClaudeHaiku4520251001: "claude-haiku-4-5-20251001", } as const; +export type WorkflowAnthropicModelModel = + (typeof WorkflowAnthropicModelModel)[keyof typeof WorkflowAnthropicModelModel]; diff --git a/src/api/types/WorkflowAnthropicModelProvider.ts b/src/api/types/WorkflowAnthropicModelProvider.ts new file mode 100644 index 00000000..f201b7d9 --- /dev/null +++ b/src/api/types/WorkflowAnthropicModelProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`anthropic`). */ +export const WorkflowAnthropicModelProvider = { + Anthropic: "anthropic", +} as const; +export type WorkflowAnthropicModelProvider = + (typeof WorkflowAnthropicModelProvider)[keyof typeof WorkflowAnthropicModelProvider]; diff --git a/src/api/types/WorkflowBackgroundSound.ts b/src/api/types/WorkflowBackgroundSound.ts index b198608e..f2dc253c 100644 --- a/src/api/types/WorkflowBackgroundSound.ts +++ b/src/api/types/WorkflowBackgroundSound.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. diff --git a/src/api/types/WorkflowBackgroundSoundZero.ts b/src/api/types/WorkflowBackgroundSoundZero.ts index cab45c31..9bdff16e 100644 --- a/src/api/types/WorkflowBackgroundSoundZero.ts +++ b/src/api/types/WorkflowBackgroundSoundZero.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type WorkflowBackgroundSoundZero = "off" | "office"; export const WorkflowBackgroundSoundZero = { Off: "off", Office: "office", } as const; +export type WorkflowBackgroundSoundZero = + (typeof WorkflowBackgroundSoundZero)[keyof typeof WorkflowBackgroundSoundZero]; diff --git a/src/api/types/WorkflowCredentialsItem.ts b/src/api/types/WorkflowCredentialsItem.ts index 0be0de1c..76db780d 100644 --- a/src/api/types/WorkflowCredentialsItem.ts +++ b/src/api/types/WorkflowCredentialsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type WorkflowCredentialsItem = | Vapi.CreateElevenLabsCredentialDto diff --git a/src/api/types/WorkflowCustomModel.ts b/src/api/types/WorkflowCustomModel.ts index 82031f76..c4b04af0 100644 --- a/src/api/types/WorkflowCustomModel.ts +++ b/src/api/types/WorkflowCustomModel.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface WorkflowCustomModel { /** This is the provider of the model (`custom-llm`). */ - provider: "custom-llm"; + provider: Vapi.WorkflowCustomModelProvider; /** * This determines whether metadata is sent in requests to the custom provider. * diff --git a/src/api/types/WorkflowCustomModelMetadataSendMode.ts b/src/api/types/WorkflowCustomModelMetadataSendMode.ts index e7f4a14e..59f36cb8 100644 --- a/src/api/types/WorkflowCustomModelMetadataSendMode.ts +++ b/src/api/types/WorkflowCustomModelMetadataSendMode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This determines whether metadata is sent in requests to the custom provider. @@ -13,9 +11,10 @@ * * Default is `variable`. */ -export type WorkflowCustomModelMetadataSendMode = "off" | "variable" | "destructured"; export const WorkflowCustomModelMetadataSendMode = { Off: "off", Variable: "variable", Destructured: "destructured", } as const; +export type WorkflowCustomModelMetadataSendMode = + (typeof WorkflowCustomModelMetadataSendMode)[keyof typeof WorkflowCustomModelMetadataSendMode]; diff --git a/src/api/types/WorkflowCustomModelProvider.ts b/src/api/types/WorkflowCustomModelProvider.ts new file mode 100644 index 00000000..dc81ef77 --- /dev/null +++ b/src/api/types/WorkflowCustomModelProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`custom-llm`). */ +export const WorkflowCustomModelProvider = { + CustomLlm: "custom-llm", +} as const; +export type WorkflowCustomModelProvider = + (typeof WorkflowCustomModelProvider)[keyof typeof WorkflowCustomModelProvider]; diff --git a/src/api/types/WorkflowGoogleModel.ts b/src/api/types/WorkflowGoogleModel.ts index 40b038d1..b7f69def 100644 --- a/src/api/types/WorkflowGoogleModel.ts +++ b/src/api/types/WorkflowGoogleModel.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface WorkflowGoogleModel { /** This is the provider of the model (`google`). */ - provider: "google"; + provider: Vapi.WorkflowGoogleModelProvider; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: Vapi.WorkflowGoogleModelModel; /** This is the temperature of the model. */ diff --git a/src/api/types/WorkflowGoogleModelModel.ts b/src/api/types/WorkflowGoogleModelModel.ts index 15f80863..2b92594e 100644 --- a/src/api/types/WorkflowGoogleModelModel.ts +++ b/src/api/types/WorkflowGoogleModelModel.ts @@ -1,25 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b - */ -export type WorkflowGoogleModelModel = - | "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"; +/** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ export const WorkflowGoogleModelModel = { Gemini25Pro: "gemini-2.5-pro", Gemini25Flash: "gemini-2.5-flash", @@ -36,3 +17,4 @@ export const WorkflowGoogleModelModel = { Gemini15Pro002: "gemini-1.5-pro-002", Gemini10Pro: "gemini-1.0-pro", } as const; +export type WorkflowGoogleModelModel = (typeof WorkflowGoogleModelModel)[keyof typeof WorkflowGoogleModelModel]; diff --git a/src/api/types/WorkflowGoogleModelProvider.ts b/src/api/types/WorkflowGoogleModelProvider.ts new file mode 100644 index 00000000..ecd5039a --- /dev/null +++ b/src/api/types/WorkflowGoogleModelProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`google`). */ +export const WorkflowGoogleModelProvider = { + Google: "google", +} as const; +export type WorkflowGoogleModelProvider = + (typeof WorkflowGoogleModelProvider)[keyof typeof WorkflowGoogleModelProvider]; diff --git a/src/api/types/WorkflowHooksItem.ts b/src/api/types/WorkflowHooksItem.ts index d7c12fbe..a1a2f593 100644 --- a/src/api/types/WorkflowHooksItem.ts +++ b/src/api/types/WorkflowHooksItem.ts @@ -1,11 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type WorkflowHooksItem = | Vapi.CallHookCallEnding | Vapi.CallHookAssistantSpeechInterrupted | Vapi.CallHookCustomerSpeechInterrupted - | Vapi.CallHookCustomerSpeechTimeout; + | Vapi.CallHookCustomerSpeechTimeout + | Vapi.CallHookModelResponseTimeout; diff --git a/src/api/types/WorkflowModel.ts b/src/api/types/WorkflowModel.ts index c667feee..4a36a828 100644 --- a/src/api/types/WorkflowModel.ts +++ b/src/api/types/WorkflowModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the model for the workflow. diff --git a/src/api/types/WorkflowNodesItem.ts b/src/api/types/WorkflowNodesItem.ts index cefc5d4d..ea395e03 100644 --- a/src/api/types/WorkflowNodesItem.ts +++ b/src/api/types/WorkflowNodesItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type WorkflowNodesItem = Vapi.ConversationNode | Vapi.ToolNode; diff --git a/src/api/types/WorkflowOpenAiModel.ts b/src/api/types/WorkflowOpenAiModel.ts index ed0885dd..9d7b71b9 100644 --- a/src/api/types/WorkflowOpenAiModel.ts +++ b/src/api/types/WorkflowOpenAiModel.ts @@ -1,12 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface WorkflowOpenAiModel { /** This is the provider of the model (`openai`). */ - provider: "openai"; + provider: Vapi.WorkflowOpenAiModelProvider; /** * This is the OpenAI model that will be used. * diff --git a/src/api/types/WorkflowOpenAiModelModel.ts b/src/api/types/WorkflowOpenAiModelModel.ts index cb476905..40046658 100644 --- a/src/api/types/WorkflowOpenAiModelModel.ts +++ b/src/api/types/WorkflowOpenAiModelModel.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This is the OpenAI model that will be used. @@ -8,101 +6,9 @@ * 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/. */ -export type WorkflowOpenAiModelModel = - | "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-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-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-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-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:australia" - | "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"; export const WorkflowOpenAiModelModel = { + Gpt51: "gpt-5.1", + Gpt51ChatLatest: "gpt-5.1-chat-latest", Gpt5: "gpt-5", Gpt5Mini: "gpt-5-mini", Gpt5Nano: "gpt-5-nano", @@ -197,3 +103,4 @@ export const WorkflowOpenAiModelModel = { Gpt35Turbo1106Canadaeast: "gpt-3.5-turbo-1106:canadaeast", Gpt35Turbo1106Westus: "gpt-3.5-turbo-1106:westus", } as const; +export type WorkflowOpenAiModelModel = (typeof WorkflowOpenAiModelModel)[keyof typeof WorkflowOpenAiModelModel]; diff --git a/src/api/types/WorkflowOpenAiModelProvider.ts b/src/api/types/WorkflowOpenAiModelProvider.ts new file mode 100644 index 00000000..95054ff1 --- /dev/null +++ b/src/api/types/WorkflowOpenAiModelProvider.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the provider of the model (`openai`). */ +export const WorkflowOpenAiModelProvider = { + Openai: "openai", +} as const; +export type WorkflowOpenAiModelProvider = + (typeof WorkflowOpenAiModelProvider)[keyof typeof WorkflowOpenAiModelProvider]; diff --git a/src/api/types/WorkflowOverrides.ts b/src/api/types/WorkflowOverrides.ts index f54720c5..63660c3f 100644 --- a/src/api/types/WorkflowOverrides.ts +++ b/src/api/types/WorkflowOverrides.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface WorkflowOverrides { /** diff --git a/src/api/types/WorkflowTranscriber.ts b/src/api/types/WorkflowTranscriber.ts index e69ac4e6..031f79dc 100644 --- a/src/api/types/WorkflowTranscriber.ts +++ b/src/api/types/WorkflowTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the transcriber for the workflow. diff --git a/src/api/types/WorkflowUserEditable.ts b/src/api/types/WorkflowUserEditable.ts index a502d21f..b4c50dbc 100644 --- a/src/api/types/WorkflowUserEditable.ts +++ b/src/api/types/WorkflowUserEditable.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface WorkflowUserEditable { nodes: Vapi.WorkflowUserEditableNodesItem[]; diff --git a/src/api/types/WorkflowUserEditableBackgroundSound.ts b/src/api/types/WorkflowUserEditableBackgroundSound.ts index c2f676fc..dde0d6a4 100644 --- a/src/api/types/WorkflowUserEditableBackgroundSound.ts +++ b/src/api/types/WorkflowUserEditableBackgroundSound.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. diff --git a/src/api/types/WorkflowUserEditableBackgroundSoundZero.ts b/src/api/types/WorkflowUserEditableBackgroundSoundZero.ts index 11219a93..f239e1b0 100644 --- a/src/api/types/WorkflowUserEditableBackgroundSoundZero.ts +++ b/src/api/types/WorkflowUserEditableBackgroundSoundZero.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type WorkflowUserEditableBackgroundSoundZero = "off" | "office"; export const WorkflowUserEditableBackgroundSoundZero = { Off: "off", Office: "office", } as const; +export type WorkflowUserEditableBackgroundSoundZero = + (typeof WorkflowUserEditableBackgroundSoundZero)[keyof typeof WorkflowUserEditableBackgroundSoundZero]; diff --git a/src/api/types/WorkflowUserEditableCredentialsItem.ts b/src/api/types/WorkflowUserEditableCredentialsItem.ts index 9925e08e..8626cfeb 100644 --- a/src/api/types/WorkflowUserEditableCredentialsItem.ts +++ b/src/api/types/WorkflowUserEditableCredentialsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type WorkflowUserEditableCredentialsItem = | Vapi.CreateElevenLabsCredentialDto diff --git a/src/api/types/WorkflowUserEditableHooksItem.ts b/src/api/types/WorkflowUserEditableHooksItem.ts index c388fb92..02c56aae 100644 --- a/src/api/types/WorkflowUserEditableHooksItem.ts +++ b/src/api/types/WorkflowUserEditableHooksItem.ts @@ -1,11 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type WorkflowUserEditableHooksItem = | Vapi.CallHookCallEnding | Vapi.CallHookAssistantSpeechInterrupted | Vapi.CallHookCustomerSpeechInterrupted - | Vapi.CallHookCustomerSpeechTimeout; + | Vapi.CallHookCustomerSpeechTimeout + | Vapi.CallHookModelResponseTimeout; diff --git a/src/api/types/WorkflowUserEditableModel.ts b/src/api/types/WorkflowUserEditableModel.ts index 9a25b7ef..9a53bd4b 100644 --- a/src/api/types/WorkflowUserEditableModel.ts +++ b/src/api/types/WorkflowUserEditableModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the model for the workflow. diff --git a/src/api/types/WorkflowUserEditableNodesItem.ts b/src/api/types/WorkflowUserEditableNodesItem.ts index 8dc55f0b..63349fab 100644 --- a/src/api/types/WorkflowUserEditableNodesItem.ts +++ b/src/api/types/WorkflowUserEditableNodesItem.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type WorkflowUserEditableNodesItem = Vapi.ConversationNode | Vapi.ToolNode; diff --git a/src/api/types/WorkflowUserEditableTranscriber.ts b/src/api/types/WorkflowUserEditableTranscriber.ts index 31241972..42526321 100644 --- a/src/api/types/WorkflowUserEditableTranscriber.ts +++ b/src/api/types/WorkflowUserEditableTranscriber.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the transcriber for the workflow. diff --git a/src/api/types/WorkflowUserEditableVoice.ts b/src/api/types/WorkflowUserEditableVoice.ts index f2e8e707..ee156acd 100644 --- a/src/api/types/WorkflowUserEditableVoice.ts +++ b/src/api/types/WorkflowUserEditableVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voice for the workflow. diff --git a/src/api/types/WorkflowUserEditableVoicemailDetection.ts b/src/api/types/WorkflowUserEditableVoicemailDetection.ts index dee9b740..7fb4f630 100644 --- a/src/api/types/WorkflowUserEditableVoicemailDetection.ts +++ b/src/api/types/WorkflowUserEditableVoicemailDetection.ts @@ -1,13 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voicemail detection plan for the workflow. */ export type WorkflowUserEditableVoicemailDetection = + | Vapi.WorkflowUserEditableVoicemailDetectionZero | Vapi.GoogleVoicemailDetectionPlan | Vapi.OpenAiVoicemailDetectionPlan | Vapi.TwilioVoicemailDetectionPlan diff --git a/src/api/types/WorkflowUserEditableVoicemailDetectionZero.ts b/src/api/types/WorkflowUserEditableVoicemailDetectionZero.ts new file mode 100644 index 00000000..0b31ea79 --- /dev/null +++ b/src/api/types/WorkflowUserEditableVoicemailDetectionZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const WorkflowUserEditableVoicemailDetectionZero = { + Off: "off", +} as const; +export type WorkflowUserEditableVoicemailDetectionZero = + (typeof WorkflowUserEditableVoicemailDetectionZero)[keyof typeof WorkflowUserEditableVoicemailDetectionZero]; diff --git a/src/api/types/WorkflowVoice.ts b/src/api/types/WorkflowVoice.ts index 342d6eb0..4dd99eb8 100644 --- a/src/api/types/WorkflowVoice.ts +++ b/src/api/types/WorkflowVoice.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voice for the workflow. diff --git a/src/api/types/WorkflowVoicemailDetection.ts b/src/api/types/WorkflowVoicemailDetection.ts index 51bb7cb5..69189a6f 100644 --- a/src/api/types/WorkflowVoicemailDetection.ts +++ b/src/api/types/WorkflowVoicemailDetection.ts @@ -1,13 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; /** * This is the voicemail detection plan for the workflow. */ export type WorkflowVoicemailDetection = + | Vapi.WorkflowVoicemailDetectionZero | Vapi.GoogleVoicemailDetectionPlan | Vapi.OpenAiVoicemailDetectionPlan | Vapi.TwilioVoicemailDetectionPlan diff --git a/src/api/types/WorkflowVoicemailDetectionZero.ts b/src/api/types/WorkflowVoicemailDetectionZero.ts new file mode 100644 index 00000000..216a54b5 --- /dev/null +++ b/src/api/types/WorkflowVoicemailDetectionZero.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const WorkflowVoicemailDetectionZero = { + Off: "off", +} as const; +export type WorkflowVoicemailDetectionZero = + (typeof WorkflowVoicemailDetectionZero)[keyof typeof WorkflowVoicemailDetectionZero]; diff --git a/src/api/types/XAiCredential.ts b/src/api/types/XAiCredential.ts index fd224946..4aeffba5 100644 --- a/src/api/types/XAiCredential.ts +++ b/src/api/types/XAiCredential.ts @@ -1,10 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface XAiCredential { /** This is the api key for Grok in XAi's console. Get it from here: https://console.x.ai */ - provider: "xai"; + provider: Vapi.XAiCredentialProvider; /** This is not returned in the API. */ apiKey: string; /** This is the unique identifier for the credential. */ diff --git a/src/api/types/XAiCredentialProvider.ts b/src/api/types/XAiCredentialProvider.ts new file mode 100644 index 00000000..e91b74a0 --- /dev/null +++ b/src/api/types/XAiCredentialProvider.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** This is the api key for Grok in XAi's console. Get it from here: https://console.x.ai */ +export const XAiCredentialProvider = { + Xai: "xai", +} as const; +export type XAiCredentialProvider = (typeof XAiCredentialProvider)[keyof typeof XAiCredentialProvider]; diff --git a/src/api/types/XaiModel.ts b/src/api/types/XaiModel.ts index 8b38b9f5..23e331ae 100644 --- a/src/api/types/XaiModel.ts +++ b/src/api/types/XaiModel.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export interface XaiModel { /** This is the starting state for the conversation. */ @@ -23,7 +21,7 @@ export interface XaiModel { knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto; /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ model: Vapi.XaiModelModel; - provider: "xai"; + provider: Vapi.XaiModelProvider; /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */ temperature?: number; /** This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. */ diff --git a/src/api/types/XaiModelModel.ts b/src/api/types/XaiModelModel.ts index 8a519721..0d01bc3e 100644 --- a/src/api/types/XaiModelModel.ts +++ b/src/api/types/XaiModelModel.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b - */ -export type XaiModelModel = "grok-beta" | "grok-2" | "grok-3" | "grok-4-fast-reasoning" | "grok-4-fast-non-reasoning"; +/** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */ export const XaiModelModel = { GrokBeta: "grok-beta", Grok2: "grok-2", @@ -13,3 +8,4 @@ export const XaiModelModel = { Grok4FastReasoning: "grok-4-fast-reasoning", Grok4FastNonReasoning: "grok-4-fast-non-reasoning", } as const; +export type XaiModelModel = (typeof XaiModelModel)[keyof typeof XaiModelModel]; diff --git a/src/api/types/XaiModelProvider.ts b/src/api/types/XaiModelProvider.ts new file mode 100644 index 00000000..d79ba4bc --- /dev/null +++ b/src/api/types/XaiModelProvider.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export const XaiModelProvider = { + Xai: "xai", +} as const; +export type XaiModelProvider = (typeof XaiModelProvider)[keyof typeof XaiModelProvider]; diff --git a/src/api/types/XaiModelToolsItem.ts b/src/api/types/XaiModelToolsItem.ts index 35c4a47e..af341617 100644 --- a/src/api/types/XaiModelToolsItem.ts +++ b/src/api/types/XaiModelToolsItem.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as Vapi from "../index.js"; +import type * as Vapi from "../index.js"; export type XaiModelToolsItem = | Vapi.CreateApiRequestToolDto diff --git a/src/api/types/XssSecurityFilter.ts b/src/api/types/XssSecurityFilter.ts index d44c334d..4e98e6bb 100644 --- a/src/api/types/XssSecurityFilter.ts +++ b/src/api/types/XssSecurityFilter.ts @@ -1,8 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. + +import type * as Vapi from "../index.js"; export interface XssSecurityFilter { /** The type of security threat to filter. */ - type: "xss"; + type: Vapi.XssSecurityFilterType; } diff --git a/src/api/types/XssSecurityFilterType.ts b/src/api/types/XssSecurityFilterType.ts new file mode 100644 index 00000000..60fe7dce --- /dev/null +++ b/src/api/types/XssSecurityFilterType.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of security threat to filter. */ +export const XssSecurityFilterType = { + Xss: "xss", +} as const; +export type XssSecurityFilterType = (typeof XssSecurityFilterType)[keyof typeof XssSecurityFilterType]; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 9835f96a..ceda5f76 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,1319 +1,1811 @@ -export * from "./FallbackTranscriberPlanTranscribersItem.js"; -export * from "./FallbackTranscriberPlan.js"; +export * from "./AddVoiceToProviderDto.js"; +export * from "./AiEdgeCondition.js"; +export * from "./AiEdgeConditionType.js"; +export * from "./Analysis.js"; +export * from "./AnalysisCost.js"; +export * from "./AnalysisCostAnalysisType.js"; +export * from "./AnalysisCostBreakdown.js"; +export * from "./AnalysisCostType.js"; +export * from "./AnalysisPlan.js"; +export * from "./AnalyticsOperation.js"; +export * from "./AnalyticsOperationColumn.js"; +export * from "./AnalyticsOperationOperation.js"; +export * from "./AnalyticsQuery.js"; +export * from "./AnalyticsQueryGroupByItem.js"; +export * from "./AnalyticsQueryResult.js"; +export * from "./AnalyticsQueryTable.js"; +export * from "./AnthropicCredential.js"; +export * from "./AnthropicCredentialProvider.js"; +export * from "./AnthropicModel.js"; +export * from "./AnthropicModelModel.js"; +export * from "./AnthropicModelProvider.js"; +export * from "./AnthropicModelToolsItem.js"; +export * from "./AnthropicThinkingConfig.js"; +export * from "./AnthropicThinkingConfigType.js"; +export * from "./AnyscaleCredential.js"; +export * from "./AnyscaleCredentialProvider.js"; +export * from "./AnyscaleModel.js"; +export * from "./AnyscaleModelProvider.js"; +export * from "./AnyscaleModelToolsItem.js"; +export * from "./ApiRequestTool.js"; +export * from "./ApiRequestToolMessagesItem.js"; +export * from "./ApiRequestToolMethod.js"; +export * from "./Artifact.js"; +export * from "./ArtifactMessagesItem.js"; +export * from "./ArtifactPlan.js"; +export * from "./ArtifactPlanRecordingFormat.js"; +export * from "./AssemblyAiCredential.js"; +export * from "./AssemblyAiCredentialProvider.js"; export * from "./AssemblyAiTranscriber.js"; +export * from "./AssemblyAiTranscriberLanguage.js"; +export * from "./AssemblyAiTranscriberProvider.js"; +export * from "./Assistant.js"; +export * from "./AssistantBackgroundSound.js"; +export * from "./AssistantBackgroundSoundZero.js"; +export * from "./AssistantClientMessagesItem.js"; +export * from "./AssistantCredentialsItem.js"; +export * from "./AssistantCustomEndpointingRule.js"; +export * from "./AssistantCustomEndpointingRuleType.js"; +export * from "./AssistantFirstMessageMode.js"; +export * from "./AssistantHookAssistantSpeechInterrupted.js"; +export * from "./AssistantHookCallEnding.js"; +export * from "./AssistantHookCustomerSpeechInterrupted.js"; +export * from "./AssistantHooksItem.js"; +export * from "./AssistantMessage.js"; +export * from "./AssistantMessageEvaluationContinuePlan.js"; +export * from "./AssistantMessageJudgePlanAi.js"; +export * from "./AssistantMessageJudgePlanAiModel.js"; +export * from "./AssistantMessageJudgePlanAiType.js"; +export * from "./AssistantMessageJudgePlanExact.js"; +export * from "./AssistantMessageJudgePlanExactType.js"; +export * from "./AssistantMessageJudgePlanRegex.js"; +export * from "./AssistantMessageJudgePlanRegexType.js"; +export * from "./AssistantMessageRole.js"; +export * from "./AssistantModel.js"; +export * from "./AssistantOverrides.js"; +export * from "./AssistantOverridesBackgroundSound.js"; +export * from "./AssistantOverridesBackgroundSoundZero.js"; +export * from "./AssistantOverridesClientMessagesItem.js"; +export * from "./AssistantOverridesCredentialsItem.js"; +export * from "./AssistantOverridesFirstMessageMode.js"; +export * from "./AssistantOverridesHooksItem.js"; +export * from "./AssistantOverridesModel.js"; +export * from "./AssistantOverridesServerMessagesItem.js"; +export * from "./AssistantOverridesToolsAppendItem.js"; +export * from "./AssistantOverridesTranscriber.js"; +export * from "./AssistantOverridesVoice.js"; +export * from "./AssistantOverridesVoicemailDetection.js"; +export * from "./AssistantOverridesVoicemailDetectionZero.js"; +export * from "./AssistantPaginatedResponse.js"; +export * from "./AssistantServerMessagesItem.js"; +export * from "./AssistantTranscriber.js"; +export * from "./AssistantUserEditable.js"; +export * from "./AssistantVersionPaginatedResponse.js"; +export * from "./AssistantVoice.js"; +export * from "./AssistantVoicemailDetection.js"; +export * from "./AssistantVoicemailDetectionZero.js"; +export * from "./AutoReloadPlan.js"; +export * from "./AzureBlobStorageBucketPlan.js"; +export * from "./AzureCredential.js"; +export * from "./AzureCredentialProvider.js"; +export * from "./AzureCredentialRegion.js"; +export * from "./AzureCredentialService.js"; +export * from "./AzureOpenAiCredential.js"; +export * from "./AzureOpenAiCredentialModelsItem.js"; +export * from "./AzureOpenAiCredentialProvider.js"; +export * from "./AzureOpenAiCredentialRegion.js"; +export * from "./AzureSpeechTranscriber.js"; export * from "./AzureSpeechTranscriberLanguage.js"; +export * from "./AzureSpeechTranscriberProvider.js"; export * from "./AzureSpeechTranscriberSegmentationStrategy.js"; -export * from "./AzureSpeechTranscriber.js"; -export * from "./CartesiaTranscriberLanguage.js"; -export * from "./CartesiaTranscriber.js"; +export * from "./AzureVoice.js"; +export * from "./AzureVoiceId.js"; +export * from "./AzureVoiceIdEnum.js"; +export * from "./AzureVoiceProvider.js"; +export * from "./BackgroundSpeechDenoisingPlan.js"; export * from "./BackoffPlan.js"; -export * from "./Server.js"; -export * from "./CustomTranscriber.js"; -export * from "./DeepgramTranscriber.js"; -export * from "./ElevenLabsTranscriberLanguage.js"; -export * from "./ElevenLabsTranscriber.js"; -export * from "./GladiaCustomVocabularyConfigDtoVocabularyItem.js"; -export * from "./GladiaCustomVocabularyConfigDto.js"; -export * from "./GladiaTranscriberModel.js"; -export * from "./GladiaTranscriberLanguageBehaviour.js"; -export * from "./GladiaTranscriberLanguage.js"; -export * from "./GladiaTranscriberLanguages.js"; -export * from "./GladiaTranscriberRegion.js"; -export * from "./GladiaTranscriber.js"; -export * from "./SpeechmaticsCustomVocabularyItem.js"; -export * from "./SpeechmaticsTranscriberLanguage.js"; -export * from "./SpeechmaticsTranscriberOperatingPoint.js"; -export * from "./SpeechmaticsTranscriberRegion.js"; -export * from "./SpeechmaticsTranscriberNumeralStyle.js"; -export * from "./SpeechmaticsTranscriber.js"; -export * from "./TalkscriberTranscriberLanguage.js"; -export * from "./TalkscriberTranscriber.js"; -export * from "./GoogleTranscriberModel.js"; -export * from "./GoogleTranscriberLanguage.js"; -export * from "./GoogleTranscriber.js"; -export * from "./OpenAiTranscriberModel.js"; -export * from "./OpenAiTranscriberLanguage.js"; -export * from "./OpenAiTranscriber.js"; -export * from "./FallbackAssemblyAiTranscriber.js"; -export * from "./FallbackAzureSpeechTranscriberLanguage.js"; -export * from "./FallbackAzureSpeechTranscriberSegmentationStrategy.js"; -export * from "./FallbackAzureSpeechTranscriber.js"; -export * from "./FallbackCartesiaTranscriberLanguage.js"; -export * from "./FallbackCartesiaTranscriber.js"; -export * from "./FallbackCustomTranscriber.js"; -export * from "./FallbackDeepgramTranscriber.js"; -export * from "./FallbackElevenLabsTranscriberLanguage.js"; -export * from "./FallbackElevenLabsTranscriber.js"; -export * from "./GladiaVocabularyItemDto.js"; -export * from "./FallbackGladiaTranscriberModel.js"; -export * from "./FallbackGladiaTranscriberLanguageBehaviour.js"; -export * from "./FallbackGladiaTranscriberLanguage.js"; -export * from "./FallbackGladiaTranscriberLanguages.js"; -export * from "./FallbackGladiaTranscriberRegion.js"; -export * from "./FallbackGladiaTranscriber.js"; -export * from "./FallbackSpeechmaticsTranscriberLanguage.js"; -export * from "./FallbackSpeechmaticsTranscriberOperatingPoint.js"; -export * from "./FallbackSpeechmaticsTranscriberRegion.js"; -export * from "./FallbackSpeechmaticsTranscriberNumeralStyle.js"; -export * from "./FallbackSpeechmaticsTranscriber.js"; -export * from "./FallbackTalkscriberTranscriberLanguage.js"; -export * from "./FallbackTalkscriberTranscriber.js"; -export * from "./FallbackGoogleTranscriberModel.js"; -export * from "./FallbackGoogleTranscriberLanguage.js"; -export * from "./FallbackGoogleTranscriber.js"; -export * from "./FallbackOpenAiTranscriberModel.js"; -export * from "./FallbackOpenAiTranscriberLanguage.js"; -export * from "./FallbackOpenAiTranscriber.js"; -export * from "./LangfuseObservabilityPlan.js"; -export * from "./TextContentLanguage.js"; -export * from "./TextContent.js"; -export * from "./ConditionOperator.js"; -export * from "./Condition.js"; -export * from "./ToolMessageStart.js"; -export * from "./ToolMessageCompleteRole.js"; -export * from "./ToolMessageComplete.js"; -export * from "./ToolMessageFailed.js"; -export * from "./ToolMessageDelayed.js"; -export * from "./MessageTargetRole.js"; -export * from "./MessageTarget.js"; -export * from "./RegexCondition.js"; -export * from "./LiquidCondition.js"; -export * from "./GroupConditionOperator.js"; -export * from "./GroupConditionConditionsItem.js"; -export * from "./GroupCondition.js"; -export * from "./ToolRejectionPlanConditionsItem.js"; -export * from "./ToolRejectionPlan.js"; -export * from "./CreateDtmfToolDtoMessagesItem.js"; -export * from "./CreateDtmfToolDto.js"; -export * from "./CreateEndCallToolDtoMessagesItem.js"; -export * from "./CreateEndCallToolDto.js"; -export * from "./CreateVoicemailToolDtoMessagesItem.js"; -export * from "./CreateVoicemailToolDto.js"; -export * from "./JsonSchemaType.js"; -export * from "./JsonSchemaFormat.js"; -export * from "./JsonSchema.js"; -export * from "./OpenAiFunctionParameters.js"; -export * from "./OpenAiFunction.js"; -export * from "./CreateFunctionToolDtoMessagesItem.js"; -export * from "./CreateFunctionToolDto.js"; -export * from "./GhlToolMetadata.js"; -export * from "./CreateGhlToolDtoMessagesItem.js"; -export * from "./CreateGhlToolDto.js"; -export * from "./MakeToolMetadata.js"; -export * from "./CreateMakeToolDtoMessagesItem.js"; -export * from "./CreateMakeToolDto.js"; -export * from "./CustomMessage.js"; -export * from "./TransferDestinationAssistantMessage.js"; -export * from "./TransferDestinationAssistant.js"; -export * from "./TransferFallbackPlanMessage.js"; -export * from "./TransferFallbackPlan.js"; -export * from "./TransferAssistantModelProvider.js"; -export * from "./TransferAssistantModel.js"; -export * from "./TransferAssistantFirstMessageMode.js"; -export * from "./TransferAssistant.js"; -export * from "./TransferCancelToolUserEditableMessagesItem.js"; -export * from "./TransferCancelToolUserEditable.js"; -export * from "./TransferSuccessfulToolUserEditableMessagesItem.js"; -export * from "./TransferSuccessfulToolUserEditable.js"; -export * from "./SummaryPlan.js"; -export * from "./TransferPlanMode.js"; -export * from "./TransferPlanMessage.js"; -export * from "./TransferPlan.js"; -export * from "./TransferDestinationNumberMessage.js"; -export * from "./TransferDestinationNumber.js"; -export * from "./TransferDestinationSipMessage.js"; -export * from "./TransferDestinationSip.js"; -export * from "./CreateTransferCallToolDtoMessagesItem.js"; -export * from "./CreateTransferCallToolDtoDestinationsItem.js"; -export * from "./CreateTransferCallToolDto.js"; -export * from "./ContextEngineeringPlanLastNMessages.js"; -export * from "./ContextEngineeringPlanNone.js"; -export * from "./ContextEngineeringPlanAll.js"; -export * from "./VariableExtractionAlias.js"; -export * from "./VariableExtractionPlan.js"; -export * from "./HandoffDestinationAssistantContextEngineeringPlan.js"; -export * from "./HandoffDestinationAssistant.js"; -export * from "./HandoffDestinationDynamic.js"; -export * from "./CreateHandoffToolDtoMessagesItem.js"; -export * from "./CreateHandoffToolDtoDestinationsItem.js"; -export * from "./CreateHandoffToolDto.js"; -export * from "./CreateCustomKnowledgeBaseDto.js"; -export * from "./KnowledgeBaseModel.js"; -export * from "./KnowledgeBase.js"; -export * from "./CreateQueryToolDtoMessagesItem.js"; -export * from "./CreateQueryToolDto.js"; -export * from "./CreateGoogleCalendarCreateEventToolDtoMessagesItem.js"; -export * from "./CreateGoogleCalendarCreateEventToolDto.js"; -export * from "./CreateGoogleSheetsRowAppendToolDtoMessagesItem.js"; -export * from "./CreateGoogleSheetsRowAppendToolDto.js"; -export * from "./CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.js"; -export * from "./CreateGoogleCalendarCheckAvailabilityToolDto.js"; -export * from "./CreateSlackSendMessageToolDtoMessagesItem.js"; -export * from "./CreateSlackSendMessageToolDto.js"; -export * from "./McpToolMetadataProtocol.js"; -export * from "./McpToolMetadata.js"; -export * from "./CreateMcpToolDtoMessagesItem.js"; -export * from "./CreateMcpToolDto.js"; -export * from "./CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.js"; -export * from "./CreateGoHighLevelCalendarAvailabilityToolDto.js"; -export * from "./CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem.js"; -export * from "./CreateGoHighLevelCalendarEventCreateToolDto.js"; -export * from "./CreateGoHighLevelContactCreateToolDtoMessagesItem.js"; -export * from "./CreateGoHighLevelContactCreateToolDto.js"; -export * from "./CreateGoHighLevelContactGetToolDtoMessagesItem.js"; -export * from "./CreateGoHighLevelContactGetToolDto.js"; -export * from "./OpenAiMessageRole.js"; -export * from "./OpenAiMessage.js"; -export * from "./AnyscaleModelToolsItem.js"; -export * from "./AnyscaleModel.js"; -export * from "./AnthropicThinkingConfig.js"; -export * from "./AnthropicModelToolsItem.js"; -export * from "./AnthropicModelModel.js"; -export * from "./AnthropicModel.js"; -export * from "./CerebrasModelToolsItem.js"; -export * from "./CerebrasModelModel.js"; -export * from "./CerebrasModel.js"; -export * from "./CustomLlmModelToolsItem.js"; -export * from "./CustomLlmModelMetadataSendMode.js"; -export * from "./CustomLlmModel.js"; -export * from "./DeepInfraModelToolsItem.js"; -export * from "./DeepInfraModel.js"; -export * from "./DeepSeekModelToolsItem.js"; -export * from "./DeepSeekModelModel.js"; -export * from "./DeepSeekModel.js"; -export * from "./GeminiMultimodalLivePrebuiltVoiceConfigVoiceName.js"; -export * from "./GeminiMultimodalLivePrebuiltVoiceConfig.js"; -export * from "./GeminiMultimodalLiveVoiceConfig.js"; -export * from "./GeminiMultimodalLiveSpeechConfig.js"; -export * from "./GoogleRealtimeConfig.js"; -export * from "./GoogleModelToolsItem.js"; -export * from "./GoogleModelModel.js"; -export * from "./GoogleModel.js"; -export * from "./GroqModelToolsItem.js"; -export * from "./GroqModelModel.js"; -export * from "./GroqModel.js"; -export * from "./InflectionAiModelToolsItem.js"; -export * from "./InflectionAiModel.js"; -export * from "./OpenAiModelToolsItem.js"; -export * from "./OpenAiModelModel.js"; -export * from "./OpenAiModelFallbackModelsItem.js"; -export * from "./OpenAiModelToolStrictCompatibilityMode.js"; -export * from "./OpenAiModel.js"; -export * from "./OpenRouterModelToolsItem.js"; -export * from "./OpenRouterModel.js"; -export * from "./PerplexityAiModelToolsItem.js"; -export * from "./PerplexityAiModel.js"; -export * from "./TogetherAiModelToolsItem.js"; -export * from "./TogetherAiModel.js"; -export * from "./HangupNode.js"; -export * from "./WorkflowOpenAiModelModel.js"; -export * from "./WorkflowOpenAiModel.js"; -export * from "./WorkflowAnthropicModelModel.js"; -export * from "./WorkflowAnthropicModel.js"; -export * from "./WorkflowGoogleModelModel.js"; -export * from "./WorkflowGoogleModel.js"; -export * from "./WorkflowCustomModelMetadataSendMode.js"; -export * from "./WorkflowCustomModel.js"; -export * from "./GlobalNodePlan.js"; -export * from "./ConversationNodeModel.js"; -export * from "./ConversationNodeTranscriber.js"; -export * from "./ConversationNodeVoice.js"; -export * from "./ConversationNodeToolsItem.js"; -export * from "./ConversationNode.js"; -export * from "./ToolNodeTool.js"; -export * from "./ToolNode.js"; -export * from "./VoicemailDetectionBackoffPlan.js"; -export * from "./GoogleVoicemailDetectionPlanType.js"; -export * from "./GoogleVoicemailDetectionPlan.js"; -export * from "./OpenAiVoicemailDetectionPlanType.js"; -export * from "./OpenAiVoicemailDetectionPlan.js"; -export * from "./TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem.js"; -export * from "./TwilioVoicemailDetectionPlan.js"; -export * from "./VapiVoicemailDetectionPlanType.js"; -export * from "./VapiVoicemailDetectionPlan.js"; -export * from "./AiEdgeCondition.js"; -export * from "./Edge.js"; -export * from "./RecordingConsentPlanStayOnLineVoice.js"; -export * from "./RecordingConsentPlanStayOnLine.js"; -export * from "./RecordingConsentPlanVerbalVoice.js"; -export * from "./RecordingConsentPlanVerbal.js"; -export * from "./SecurityFilterBase.js"; -export * from "./SecurityFilterPlanMode.js"; -export * from "./SecurityFilterPlan.js"; -export * from "./CompliancePlanRecordingConsentPlan.js"; -export * from "./CompliancePlan.js"; -export * from "./StructuredDataPlan.js"; -export * from "./StructuredDataMultiPlan.js"; -export * from "./SuccessEvaluationPlanRubric.js"; -export * from "./SuccessEvaluationPlan.js"; -export * from "./AnalysisPlan.js"; -export * from "./TranscriptPlan.js"; -export * from "./ArtifactPlanRecordingFormat.js"; -export * from "./ArtifactPlan.js"; -export * from "./RegexOptionType.js"; -export * from "./RegexOption.js"; -export * from "./AssistantCustomEndpointingRule.js"; -export * from "./CustomerCustomEndpointingRule.js"; +export * from "./BarInsight.js"; +export * from "./BarInsightFromCallTable.js"; +export * from "./BarInsightFromCallTableGroupBy.js"; +export * from "./BarInsightFromCallTableQueriesItem.js"; +export * from "./BarInsightFromCallTableType.js"; +export * from "./BarInsightGroupBy.js"; +export * from "./BarInsightMetadata.js"; +export * from "./BarInsightQueriesItem.js"; +export * from "./BashTool.js"; +export * from "./BashToolMessagesItem.js"; +export * from "./BashToolName.js"; +export * from "./BashToolSubType.js"; +export * from "./BashToolWithToolCall.js"; +export * from "./BashToolWithToolCallMessagesItem.js"; +export * from "./BashToolWithToolCallName.js"; +export * from "./BashToolWithToolCallSubType.js"; +export * from "./BashToolWithToolCallType.js"; +export * from "./BearerAuthenticationPlan.js"; export * from "./BothCustomEndpointingRule.js"; -export * from "./VapiSmartEndpointingPlanProvider.js"; -export * from "./VapiSmartEndpointingPlan.js"; -export * from "./LivekitSmartEndpointingPlanProvider.js"; -export * from "./LivekitSmartEndpointingPlan.js"; -export * from "./CustomEndpointingModelSmartEndpointingPlanProvider.js"; -export * from "./CustomEndpointingModelSmartEndpointingPlan.js"; -export * from "./TranscriptionEndpointingPlan.js"; -export * from "./StartSpeakingPlanSmartEndpointingEnabled.js"; -export * from "./StartSpeakingPlanSmartEndpointingPlan.js"; -export * from "./StartSpeakingPlanCustomEndpointingRulesItem.js"; -export * from "./StartSpeakingPlan.js"; -export * from "./StopSpeakingPlan.js"; -export * from "./MonitorPlan.js"; -export * from "./SmartDenoisingPlan.js"; -export * from "./FourierDenoisingPlan.js"; -export * from "./BackgroundSpeechDenoisingPlan.js"; -export * from "./KeypadInputPlanDelimiters.js"; -export * from "./KeypadInputPlan.js"; -export * from "./WorkflowUserEditableNodesItem.js"; -export * from "./WorkflowUserEditableModel.js"; -export * from "./WorkflowUserEditableTranscriber.js"; -export * from "./WorkflowUserEditableVoice.js"; -export * from "./WorkflowUserEditableBackgroundSoundZero.js"; -export * from "./WorkflowUserEditableBackgroundSound.js"; -export * from "./WorkflowUserEditableHooksItem.js"; -export * from "./WorkflowUserEditableCredentialsItem.js"; -export * from "./WorkflowUserEditableVoicemailDetection.js"; -export * from "./WorkflowUserEditable.js"; -export * from "./VapiModelToolsItem.js"; -export * from "./VapiModel.js"; -export * from "./XaiModelToolsItem.js"; -export * from "./XaiModelModel.js"; -export * from "./XaiModel.js"; -export * from "./ExactReplacement.js"; -export * from "./RegexReplacement.js"; -export * from "./FormatPlanReplacementsItem.js"; -export * from "./FormatPlanFormattersEnabledItem.js"; -export * from "./FormatPlan.js"; -export * from "./ChunkPlan.js"; -export * from "./FallbackPlanVoicesItem.js"; -export * from "./FallbackPlan.js"; -export * from "./AzureVoiceIdEnum.js"; -export * from "./AzureVoiceId.js"; -export * from "./AzureVoice.js"; -export * from "./CartesiaExperimentalControlsSpeed.js"; -export * from "./CartesiaSpeedControl.js"; -export * from "./CartesiaExperimentalControlsEmotion.js"; +export * from "./BothCustomEndpointingRuleType.js"; +export * from "./BotMessage.js"; +export * from "./BucketPlan.js"; +export * from "./ByoPhoneNumber.js"; +export * from "./ByoPhoneNumberFallbackDestination.js"; +export * from "./ByoPhoneNumberHooksItem.js"; +export * from "./ByoPhoneNumberStatus.js"; +export * from "./ByoSipTrunkCredential.js"; +export * from "./ByoSipTrunkCredentialProvider.js"; +export * from "./Call.js"; +export * from "./CallBatchError.js"; +export * from "./CallBatchResponse.js"; +export * from "./CallCostsItem.js"; +export * from "./CallDestination.js"; +export * from "./CallEndedReason.js"; +export * from "./CallHookAssistantSpeechInterrupted.js"; +export * from "./CallHookAssistantSpeechInterruptedDoItem.js"; +export * from "./CallHookAssistantSpeechInterruptedOn.js"; +export * from "./CallHookCallEnding.js"; +export * from "./CallHookCallEndingOn.js"; +export * from "./CallHookCustomerSpeechInterrupted.js"; +export * from "./CallHookCustomerSpeechInterruptedDoItem.js"; +export * from "./CallHookCustomerSpeechInterruptedOn.js"; +export * from "./CallHookCustomerSpeechTimeout.js"; +export * from "./CallHookCustomerSpeechTimeoutDoItem.js"; +export * from "./CallHookFilter.js"; +export * from "./CallHookFilterType.js"; +export * from "./CallHookModelResponseTimeout.js"; +export * from "./CallHookModelResponseTimeoutDoItem.js"; +export * from "./CallHookModelResponseTimeoutOn.js"; +export * from "./CallMessagesItem.js"; +export * from "./CallPaginatedResponse.js"; +export * from "./CallPhoneCallProvider.js"; +export * from "./CallPhoneCallTransport.js"; +export * from "./CallStatus.js"; +export * from "./CallType.js"; +export * from "./Campaign.js"; +export * from "./CampaignEndedReason.js"; +export * from "./CampaignPaginatedResponse.js"; +export * from "./CampaignStatus.js"; +export * from "./CartesiaCredential.js"; +export * from "./CartesiaCredentialProvider.js"; export * from "./CartesiaExperimentalControls.js"; -export * from "./CartesiaVoiceModel.js"; -export * from "./CartesiaVoiceLanguage.js"; +export * from "./CartesiaExperimentalControlsEmotion.js"; +export * from "./CartesiaExperimentalControlsSpeedZero.js"; +export * from "./CartesiaGenerationConfig.js"; +export * from "./CartesiaGenerationConfigExperimental.js"; +export * from "./CartesiaSpeedControl.js"; +export * from "./CartesiaTranscriber.js"; +export * from "./CartesiaTranscriberLanguage.js"; +export * from "./CartesiaTranscriberModel.js"; +export * from "./CartesiaTranscriberProvider.js"; export * from "./CartesiaVoice.js"; -export * from "./CustomVoice.js"; -export * from "./DeepgramVoiceId.js"; -export * from "./DeepgramVoiceModel.js"; -export * from "./DeepgramVoice.js"; -export * from "./ElevenLabsPronunciationDictionaryLocator.js"; -export * from "./ElevenLabsVoiceIdEnum.js"; -export * from "./ElevenLabsVoiceId.js"; -export * from "./ElevenLabsVoiceModel.js"; -export * from "./ElevenLabsVoice.js"; -export * from "./HumeVoiceModel.js"; -export * from "./HumeVoice.js"; -export * from "./LmntVoiceIdEnum.js"; -export * from "./LmntVoiceId.js"; -export * from "./LmntVoiceLanguage.js"; -export * from "./LmntVoice.js"; -export * from "./NeuphonicVoiceModel.js"; -export * from "./NeuphonicVoice.js"; -export * from "./OpenAiVoiceIdEnum.js"; -export * from "./OpenAiVoiceId.js"; -export * from "./OpenAiVoiceModel.js"; -export * from "./OpenAiVoice.js"; -export * from "./PlayHtVoiceIdEnum.js"; -export * from "./PlayHtVoiceId.js"; -export * from "./PlayHtVoiceEmotion.js"; -export * from "./PlayHtVoiceModel.js"; -export * from "./PlayHtVoiceLanguage.js"; -export * from "./PlayHtVoice.js"; -export * from "./RimeAiVoiceIdEnum.js"; -export * from "./RimeAiVoiceId.js"; -export * from "./RimeAiVoiceModel.js"; -export * from "./RimeAiVoice.js"; -export * from "./SesameVoice.js"; -export * from "./SmallestAiVoiceIdEnum.js"; -export * from "./SmallestAiVoiceId.js"; -export * from "./SmallestAiVoice.js"; -export * from "./TavusConversationProperties.js"; -export * from "./TavusVoiceVoiceId.js"; -export * from "./TavusVoice.js"; -export * from "./VapiVoiceVoiceId.js"; -export * from "./VapiVoice.js"; -export * from "./InworldVoiceVoiceId.js"; -export * from "./InworldVoiceLanguageCode.js"; -export * from "./InworldVoice.js"; -export * from "./MinimaxVoiceModel.js"; -export * from "./MinimaxVoiceRegion.js"; -export * from "./MinimaxVoiceLanguageBoost.js"; -export * from "./MinimaxVoice.js"; -export * from "./FallbackAzureVoiceVoiceId.js"; -export * from "./FallbackAzureVoiceId.js"; -export * from "./FallbackAzureVoice.js"; -export * from "./FallbackCartesiaVoiceModel.js"; -export * from "./FallbackCartesiaVoiceLanguage.js"; -export * from "./FallbackCartesiaVoice.js"; -export * from "./FallbackCustomVoice.js"; -export * from "./FallbackDeepgramVoiceId.js"; -export * from "./FallbackDeepgramVoiceModel.js"; -export * from "./FallbackDeepgramVoice.js"; -export * from "./FallbackElevenLabsVoiceIdEnum.js"; -export * from "./FallbackElevenLabsVoiceId.js"; -export * from "./FallbackElevenLabsVoiceModel.js"; -export * from "./FallbackElevenLabsVoice.js"; -export * from "./FallbackHumeVoiceModel.js"; -export * from "./FallbackHumeVoice.js"; -export * from "./FallbackLmntVoiceIdEnum.js"; -export * from "./FallbackLmntVoiceId.js"; -export * from "./FallbackLmntVoiceLanguage.js"; -export * from "./FallbackLmntVoice.js"; -export * from "./FallbackNeuphonicVoiceModel.js"; -export * from "./FallbackNeuphonicVoice.js"; -export * from "./FallbackOpenAiVoiceIdEnum.js"; -export * from "./FallbackOpenAiVoiceId.js"; -export * from "./FallbackOpenAiVoiceModel.js"; -export * from "./FallbackOpenAiVoice.js"; -export * from "./FallbackPlayHtVoiceIdEnum.js"; -export * from "./FallbackPlayHtVoiceId.js"; -export * from "./FallbackPlayHtVoiceEmotion.js"; -export * from "./FallbackPlayHtVoiceModel.js"; -export * from "./FallbackPlayHtVoiceLanguage.js"; -export * from "./FallbackPlayHtVoice.js"; -export * from "./FallbackRimeAiVoiceIdEnum.js"; -export * from "./FallbackRimeAiVoiceId.js"; -export * from "./FallbackRimeAiVoiceModel.js"; -export * from "./FallbackRimeAiVoice.js"; -export * from "./FallbackSesameVoice.js"; -export * from "./FallbackSmallestAiVoiceIdEnum.js"; -export * from "./FallbackSmallestAiVoiceId.js"; -export * from "./FallbackSmallestAiVoice.js"; -export * from "./FallbackTavusVoiceVoiceId.js"; -export * from "./FallbackTavusVoice.js"; -export * from "./FallbackVapiVoiceVoiceId.js"; -export * from "./FallbackVapiVoice.js"; -export * from "./FallbackInworldVoiceVoiceId.js"; -export * from "./FallbackInworldVoiceLanguageCode.js"; -export * from "./FallbackInworldVoice.js"; -export * from "./FallbackMinimaxVoiceModel.js"; -export * from "./FallbackMinimaxVoiceRegion.js"; -export * from "./FallbackMinimaxVoiceLanguageBoost.js"; -export * from "./FallbackMinimaxVoice.js"; -export * from "./TransportConfigurationTwilioRecordingChannels.js"; -export * from "./TransportConfigurationTwilio.js"; +export * from "./CartesiaVoiceLanguage.js"; +export * from "./CartesiaVoiceModel.js"; +export * from "./CartesiaVoiceProvider.js"; +export * from "./CerebrasCredential.js"; +export * from "./CerebrasCredentialProvider.js"; +export * from "./CerebrasModel.js"; +export * from "./CerebrasModelModel.js"; +export * from "./CerebrasModelProvider.js"; +export * from "./CerebrasModelToolsItem.js"; +export * from "./Chat.js"; +export * from "./ChatAssistantOverrides.js"; +export * from "./ChatCost.js"; +export * from "./ChatCostsItem.js"; +export * from "./ChatCostType.js"; +export * from "./ChatEvalAssistantMessageEvaluation.js"; +export * from "./ChatEvalAssistantMessageEvaluationJudgePlan.js"; +export * from "./ChatEvalAssistantMessageEvaluationRole.js"; +export * from "./ChatEvalAssistantMessageMock.js"; +export * from "./ChatEvalAssistantMessageMockRole.js"; +export * from "./ChatEvalAssistantMessageMockToolCall.js"; +export * from "./ChatEvalSystemMessageMock.js"; +export * from "./ChatEvalSystemMessageMockRole.js"; +export * from "./ChatEvalToolResponseMessageEvaluation.js"; +export * from "./ChatEvalToolResponseMessageEvaluationRole.js"; +export * from "./ChatEvalToolResponseMessageMock.js"; +export * from "./ChatEvalToolResponseMessageMockRole.js"; +export * from "./ChatEvalUserMessageMock.js"; +export * from "./ChatEvalUserMessageMockRole.js"; +export * from "./ChatInput.js"; +export * from "./ChatInputOneItem.js"; +export * from "./ChatMessagesItem.js"; +export * from "./ChatOutputItem.js"; +export * from "./ChatPaginatedResponse.js"; +export * from "./ChunkPlan.js"; +export * from "./ClientInboundMessage.js"; +export * from "./ClientInboundMessageAddMessage.js"; +export * from "./ClientInboundMessageAddMessageType.js"; +export * from "./ClientInboundMessageControl.js"; +export * from "./ClientInboundMessageControlControl.js"; +export * from "./ClientInboundMessageControlType.js"; +export * from "./ClientInboundMessageEndCall.js"; +export * from "./ClientInboundMessageEndCallType.js"; +export * from "./ClientInboundMessageMessage.js"; +export * from "./ClientInboundMessageSay.js"; +export * from "./ClientInboundMessageSayType.js"; +export * from "./ClientInboundMessageTransfer.js"; +export * from "./ClientInboundMessageTransferDestination.js"; +export * from "./ClientInboundMessageTransferType.js"; +export * from "./ClientMessage.js"; +export * from "./ClientMessageAssistantStarted.js"; +export * from "./ClientMessageAssistantStartedPhoneNumber.js"; +export * from "./ClientMessageAssistantStartedType.js"; +export * from "./ClientMessageCallDeleted.js"; +export * from "./ClientMessageCallDeletedPhoneNumber.js"; +export * from "./ClientMessageCallDeletedType.js"; +export * from "./ClientMessageCallDeleteFailed.js"; +export * from "./ClientMessageCallDeleteFailedPhoneNumber.js"; +export * from "./ClientMessageCallDeleteFailedType.js"; +export * from "./ClientMessageChatCreated.js"; +export * from "./ClientMessageChatCreatedPhoneNumber.js"; +export * from "./ClientMessageChatCreatedType.js"; +export * from "./ClientMessageChatDeleted.js"; +export * from "./ClientMessageChatDeletedPhoneNumber.js"; +export * from "./ClientMessageChatDeletedType.js"; +export * from "./ClientMessageConversationUpdate.js"; +export * from "./ClientMessageConversationUpdateMessagesItem.js"; +export * from "./ClientMessageConversationUpdatePhoneNumber.js"; +export * from "./ClientMessageConversationUpdateType.js"; +export * from "./ClientMessageHang.js"; +export * from "./ClientMessageHangPhoneNumber.js"; +export * from "./ClientMessageHangType.js"; +export * from "./ClientMessageLanguageChangeDetected.js"; +export * from "./ClientMessageLanguageChangeDetectedPhoneNumber.js"; +export * from "./ClientMessageLanguageChangeDetectedType.js"; +export * from "./ClientMessageMessage.js"; +export * from "./ClientMessageMetadata.js"; +export * from "./ClientMessageMetadataPhoneNumber.js"; +export * from "./ClientMessageMetadataType.js"; +export * from "./ClientMessageModelOutput.js"; +export * from "./ClientMessageModelOutputPhoneNumber.js"; +export * from "./ClientMessageModelOutputType.js"; +export * from "./ClientMessageSessionCreated.js"; +export * from "./ClientMessageSessionCreatedPhoneNumber.js"; +export * from "./ClientMessageSessionCreatedType.js"; +export * from "./ClientMessageSessionDeleted.js"; +export * from "./ClientMessageSessionDeletedPhoneNumber.js"; +export * from "./ClientMessageSessionDeletedType.js"; +export * from "./ClientMessageSessionUpdated.js"; +export * from "./ClientMessageSessionUpdatedPhoneNumber.js"; +export * from "./ClientMessageSessionUpdatedType.js"; +export * from "./ClientMessageSpeechUpdate.js"; +export * from "./ClientMessageSpeechUpdatePhoneNumber.js"; +export * from "./ClientMessageSpeechUpdateRole.js"; +export * from "./ClientMessageSpeechUpdateStatus.js"; +export * from "./ClientMessageSpeechUpdateType.js"; +export * from "./ClientMessageToolCalls.js"; +export * from "./ClientMessageToolCallsPhoneNumber.js"; +export * from "./ClientMessageToolCallsResult.js"; +export * from "./ClientMessageToolCallsResultPhoneNumber.js"; +export * from "./ClientMessageToolCallsResultType.js"; +export * from "./ClientMessageToolCallsToolWithToolCallListItem.js"; +export * from "./ClientMessageToolCallsType.js"; +export * from "./ClientMessageTranscript.js"; +export * from "./ClientMessageTranscriptPhoneNumber.js"; +export * from "./ClientMessageTranscriptRole.js"; +export * from "./ClientMessageTranscriptTranscriptType.js"; +export * from "./ClientMessageTranscriptType.js"; +export * from "./ClientMessageTransferUpdate.js"; +export * from "./ClientMessageTransferUpdateDestination.js"; +export * from "./ClientMessageTransferUpdatePhoneNumber.js"; +export * from "./ClientMessageTransferUpdateType.js"; +export * from "./ClientMessageUserInterrupted.js"; +export * from "./ClientMessageUserInterruptedPhoneNumber.js"; +export * from "./ClientMessageUserInterruptedType.js"; +export * from "./ClientMessageVoiceInput.js"; +export * from "./ClientMessageVoiceInputPhoneNumber.js"; +export * from "./ClientMessageVoiceInputType.js"; +export * from "./ClientMessageWorkflowNodeStarted.js"; +export * from "./ClientMessageWorkflowNodeStartedPhoneNumber.js"; +export * from "./ClientMessageWorkflowNodeStartedType.js"; +export * from "./CloneVoiceDto.js"; +export * from "./CloudflareCredential.js"; +export * from "./CloudflareCredentialProvider.js"; +export * from "./CloudflareR2BucketPlan.js"; +export * from "./Compliance.js"; +export * from "./ComplianceOverride.js"; +export * from "./CompliancePlan.js"; +export * from "./CompliancePlanRecordingConsentPlan.js"; +export * from "./ComputerTool.js"; +export * from "./ComputerToolMessagesItem.js"; +export * from "./ComputerToolName.js"; +export * from "./ComputerToolSubType.js"; +export * from "./ComputerToolWithToolCall.js"; +export * from "./ComputerToolWithToolCallMessagesItem.js"; +export * from "./ComputerToolWithToolCallName.js"; +export * from "./ComputerToolWithToolCallSubType.js"; +export * from "./ComputerToolWithToolCallType.js"; +export * from "./Condition.js"; +export * from "./ConditionOperator.js"; +export * from "./ContextEngineeringPlanAll.js"; +export * from "./ContextEngineeringPlanAllType.js"; +export * from "./ContextEngineeringPlanLastNMessages.js"; +export * from "./ContextEngineeringPlanLastNMessagesType.js"; +export * from "./ContextEngineeringPlanNone.js"; +export * from "./ContextEngineeringPlanNoneType.js"; +export * from "./ConversationNode.js"; +export * from "./ConversationNodeModel.js"; +export * from "./ConversationNodeToolsItem.js"; +export * from "./ConversationNodeTranscriber.js"; +export * from "./ConversationNodeType.js"; +export * from "./ConversationNodeVoice.js"; +export * from "./CostBreakdown.js"; export * from "./CreateAnthropicCredentialDto.js"; export * from "./CreateAnyscaleCredentialDto.js"; +export * from "./CreateApiRequestToolDto.js"; +export * from "./CreateApiRequestToolDtoMessagesItem.js"; +export * from "./CreateApiRequestToolDtoMethod.js"; export * from "./CreateAssemblyAiCredentialDto.js"; -export * from "./AzureBlobStorageBucketPlan.js"; -export * from "./CreateAzureCredentialDtoService.js"; -export * from "./CreateAzureCredentialDtoRegion.js"; +export * from "./CreateAssistantDto.js"; +export * from "./CreateAssistantDtoBackgroundSound.js"; +export * from "./CreateAssistantDtoBackgroundSoundZero.js"; +export * from "./CreateAssistantDtoClientMessagesItem.js"; +export * from "./CreateAssistantDtoCredentialsItem.js"; +export * from "./CreateAssistantDtoFirstMessageMode.js"; +export * from "./CreateAssistantDtoHooksItem.js"; +export * from "./CreateAssistantDtoModel.js"; +export * from "./CreateAssistantDtoServerMessagesItem.js"; +export * from "./CreateAssistantDtoTranscriber.js"; +export * from "./CreateAssistantDtoVoice.js"; +export * from "./CreateAssistantDtoVoicemailDetection.js"; +export * from "./CreateAssistantDtoVoicemailDetectionZero.js"; export * from "./CreateAzureCredentialDto.js"; -export * from "./CreateAzureOpenAiCredentialDtoRegion.js"; -export * from "./CreateAzureOpenAiCredentialDtoModelsItem.js"; +export * from "./CreateAzureCredentialDtoRegion.js"; +export * from "./CreateAzureCredentialDtoService.js"; export * from "./CreateAzureOpenAiCredentialDto.js"; -export * from "./SipTrunkGatewayOutboundProtocol.js"; -export * from "./SipTrunkGateway.js"; -export * from "./SipTrunkOutboundSipRegisterPlan.js"; -export * from "./SipTrunkOutboundAuthenticationPlan.js"; -export * from "./SbcConfiguration.js"; +export * from "./CreateAzureOpenAiCredentialDtoModelsItem.js"; +export * from "./CreateAzureOpenAiCredentialDtoRegion.js"; +export * from "./CreateBarInsightFromCallTableDto.js"; +export * from "./CreateBarInsightFromCallTableDtoGroupBy.js"; +export * from "./CreateBarInsightFromCallTableDtoQueriesItem.js"; +export * from "./CreateBashToolDto.js"; +export * from "./CreateBashToolDtoMessagesItem.js"; +export * from "./CreateBashToolDtoName.js"; +export * from "./CreateBashToolDtoSubType.js"; +export * from "./CreateByoPhoneNumberDto.js"; +export * from "./CreateByoPhoneNumberDtoFallbackDestination.js"; +export * from "./CreateByoPhoneNumberDtoHooksItem.js"; export * from "./CreateByoSipTrunkCredentialDto.js"; export * from "./CreateCartesiaCredentialDto.js"; -export * from "./CloudflareR2BucketPlan.js"; +export * from "./CreateCerebrasCredentialDto.js"; +export * from "./CreateChatStreamResponse.js"; export * from "./CreateCloudflareCredentialDto.js"; -export * from "./OAuth2AuthenticationPlan.js"; +export * from "./CreateComputerToolDto.js"; +export * from "./CreateComputerToolDtoMessagesItem.js"; +export * from "./CreateComputerToolDtoName.js"; +export * from "./CreateComputerToolDtoSubType.js"; +export * from "./CreateCustomCredentialDto.js"; +export * from "./CreateCustomCredentialDtoAuthenticationPlan.js"; +export * from "./CreateCustomerDto.js"; +export * from "./CreateCustomKnowledgeBaseDto.js"; +export * from "./CreateCustomKnowledgeBaseDtoProvider.js"; export * from "./CreateCustomLlmCredentialDto.js"; export * from "./CreateDeepgramCredentialDto.js"; export * from "./CreateDeepInfraCredentialDto.js"; export * from "./CreateDeepSeekCredentialDto.js"; +export * from "./CreateDtmfToolDto.js"; +export * from "./CreateDtmfToolDtoMessagesItem.js"; export * from "./CreateElevenLabsCredentialDto.js"; -export * from "./GcpKey.js"; -export * from "./BucketPlan.js"; +export * from "./CreateEndCallToolDto.js"; +export * from "./CreateEndCallToolDtoMessagesItem.js"; +export * from "./CreateEvalDto.js"; +export * from "./CreateEvalDtoMessagesItem.js"; +export * from "./CreateEvalDtoType.js"; +export * from "./CreateFunctionToolDto.js"; +export * from "./CreateFunctionToolDtoMessagesItem.js"; export * from "./CreateGcpCredentialDto.js"; +export * from "./CreateGhlToolDto.js"; +export * from "./CreateGhlToolDtoMessagesItem.js"; +export * from "./CreateGhlToolDtoType.js"; export * from "./CreateGladiaCredentialDto.js"; +export * from "./CreateGoHighLevelCalendarAvailabilityToolDto.js"; +export * from "./CreateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.js"; +export * from "./CreateGoHighLevelCalendarEventCreateToolDto.js"; +export * from "./CreateGoHighLevelCalendarEventCreateToolDtoMessagesItem.js"; +export * from "./CreateGoHighLevelContactCreateToolDto.js"; +export * from "./CreateGoHighLevelContactCreateToolDtoMessagesItem.js"; +export * from "./CreateGoHighLevelContactGetToolDto.js"; +export * from "./CreateGoHighLevelContactGetToolDtoMessagesItem.js"; export * from "./CreateGoHighLevelCredentialDto.js"; +export * from "./CreateGoHighLevelMcpCredentialDto.js"; +export * from "./CreateGoogleCalendarCheckAvailabilityToolDto.js"; +export * from "./CreateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.js"; +export * from "./CreateGoogleCalendarCreateEventToolDto.js"; +export * from "./CreateGoogleCalendarCreateEventToolDtoMessagesItem.js"; +export * from "./CreateGoogleCalendarOAuth2AuthorizationCredentialDto.js"; +export * from "./CreateGoogleCalendarOAuth2ClientCredentialDto.js"; +export * from "./CreateGoogleCredentialDto.js"; +export * from "./CreateGoogleSheetsOAuth2AuthorizationCredentialDto.js"; +export * from "./CreateGoogleSheetsRowAppendToolDto.js"; +export * from "./CreateGoogleSheetsRowAppendToolDtoMessagesItem.js"; export * from "./CreateGroqCredentialDto.js"; +export * from "./CreateHandoffToolDto.js"; +export * from "./CreateHandoffToolDtoDestinationsItem.js"; +export * from "./CreateHandoffToolDtoMessagesItem.js"; +export * from "./CreateHumeCredentialDto.js"; +export * from "./CreateInflectionAiCredentialDto.js"; +export * from "./CreateInworldCredentialDto.js"; export * from "./CreateLangfuseCredentialDto.js"; +export * from "./CreateLineInsightFromCallTableDto.js"; +export * from "./CreateLineInsightFromCallTableDtoGroupBy.js"; +export * from "./CreateLineInsightFromCallTableDtoQueriesItem.js"; export * from "./CreateLmntCredentialDto.js"; export * from "./CreateMakeCredentialDto.js"; +export * from "./CreateMakeToolDto.js"; +export * from "./CreateMakeToolDtoMessagesItem.js"; +export * from "./CreateMakeToolDtoType.js"; +export * from "./CreateMcpToolDto.js"; +export * from "./CreateMcpToolDtoMessagesItem.js"; +export * from "./CreateMinimaxCredentialDto.js"; +export * from "./CreateMistralCredentialDto.js"; +export * from "./CreateNeuphonicCredentialDto.js"; export * from "./CreateOpenAiCredentialDto.js"; export * from "./CreateOpenRouterCredentialDto.js"; +export * from "./CreateOrgDto.js"; +export * from "./CreateOrgDtoChannel.js"; +export * from "./CreateOutboundCallDto.js"; +export * from "./CreateOutputToolDto.js"; +export * from "./CreateOutputToolDtoMessagesItem.js"; +export * from "./CreateOutputToolDtoType.js"; export * from "./CreatePerplexityAiCredentialDto.js"; +export * from "./CreatePieInsightFromCallTableDto.js"; +export * from "./CreatePieInsightFromCallTableDtoGroupBy.js"; +export * from "./CreatePieInsightFromCallTableDtoQueriesItem.js"; export * from "./CreatePlayHtCredentialDto.js"; +export * from "./CreateQueryToolDto.js"; +export * from "./CreateQueryToolDtoMessagesItem.js"; export * from "./CreateRimeAiCredentialDto.js"; export * from "./CreateRunpodCredentialDto.js"; export * from "./CreateS3CredentialDto.js"; -export * from "./SupabaseBucketPlanRegion.js"; -export * from "./SupabaseBucketPlan.js"; -export * from "./CreateSupabaseCredentialDto.js"; +export * from "./CreateScorecardDto.js"; +export * from "./CreateSesameVoiceDto.js"; +export * from "./CreateSlackOAuth2AuthorizationCredentialDto.js"; +export * from "./CreateSlackSendMessageToolDto.js"; +export * from "./CreateSlackSendMessageToolDtoMessagesItem.js"; export * from "./CreateSmallestAiCredentialDto.js"; +export * from "./CreateSmsToolDto.js"; +export * from "./CreateSmsToolDtoMessagesItem.js"; +export * from "./CreateSpeechmaticsCredentialDto.js"; +export * from "./CreateSquadDto.js"; +export * from "./CreateStructuredOutputDto.js"; +export * from "./CreateStructuredOutputDtoModel.js"; +export * from "./CreateSupabaseCredentialDto.js"; export * from "./CreateTavusCredentialDto.js"; +export * from "./CreateTelnyxPhoneNumberDto.js"; +export * from "./CreateTelnyxPhoneNumberDtoFallbackDestination.js"; +export * from "./CreateTelnyxPhoneNumberDtoHooksItem.js"; +export * from "./CreateTestSuiteDto.js"; +export * from "./CreateTestSuiteRunDto.js"; +export * from "./CreateTestSuiteTestChatDto.js"; +export * from "./CreateTestSuiteTestChatDtoType.js"; +export * from "./CreateTestSuiteTestVoiceDto.js"; +export * from "./CreateTestSuiteTestVoiceDtoType.js"; +export * from "./CreateTextEditorToolDto.js"; +export * from "./CreateTextEditorToolDtoMessagesItem.js"; +export * from "./CreateTextEditorToolDtoName.js"; +export * from "./CreateTextEditorToolDtoSubType.js"; +export * from "./CreateTextInsightFromCallTableDto.js"; +export * from "./CreateTextInsightFromCallTableDtoQueriesItem.js"; export * from "./CreateTogetherAiCredentialDto.js"; +export * from "./CreateTokenDto.js"; +export * from "./CreateTokenDtoTag.js"; +export * from "./CreateToolTemplateDto.js"; +export * from "./CreateToolTemplateDtoDetails.js"; +export * from "./CreateToolTemplateDtoProvider.js"; +export * from "./CreateToolTemplateDtoProviderDetails.js"; +export * from "./CreateToolTemplateDtoType.js"; +export * from "./CreateToolTemplateDtoVisibility.js"; +export * from "./CreateTransferCallToolDto.js"; +export * from "./CreateTransferCallToolDtoDestinationsItem.js"; +export * from "./CreateTransferCallToolDtoMessagesItem.js"; +export * from "./CreateTrieveCredentialDto.js"; +export * from "./CreateTrieveKnowledgeBaseDto.js"; +export * from "./CreateTrieveKnowledgeBaseDtoProvider.js"; export * from "./CreateTwilioCredentialDto.js"; +export * from "./CreateTwilioPhoneNumberDto.js"; +export * from "./CreateTwilioPhoneNumberDtoFallbackDestination.js"; +export * from "./CreateTwilioPhoneNumberDtoHooksItem.js"; +export * from "./CreateVapiPhoneNumberDto.js"; +export * from "./CreateVapiPhoneNumberDtoFallbackDestination.js"; +export * from "./CreateVapiPhoneNumberDtoHooksItem.js"; +export * from "./CreateVoicemailToolDto.js"; +export * from "./CreateVoicemailToolDtoMessagesItem.js"; +export * from "./CreateVoicemailToolDtoType.js"; export * from "./CreateVonageCredentialDto.js"; -export * from "./CreateWebhookCredentialDtoAuthenticationPlan.js"; +export * from "./CreateVonagePhoneNumberDto.js"; +export * from "./CreateVonagePhoneNumberDtoFallbackDestination.js"; +export * from "./CreateVonagePhoneNumberDtoHooksItem.js"; +export * from "./CreateWebCallDto.js"; +export * from "./CreateWebChatDto.js"; +export * from "./CreateWebChatDtoInput.js"; +export * from "./CreateWebChatDtoInputOneItem.js"; +export * from "./CreateWebCustomerDto.js"; export * from "./CreateWebhookCredentialDto.js"; -export * from "./CreateXAiCredentialDto.js"; -export * from "./CreateGoogleCalendarOAuth2ClientCredentialDto.js"; -export * from "./CreateGoogleCalendarOAuth2AuthorizationCredentialDto.js"; -export * from "./CreateGoogleSheetsOAuth2AuthorizationCredentialDto.js"; -export * from "./CreateSlackOAuth2AuthorizationCredentialDto.js"; -export * from "./CreateMinimaxCredentialDto.js"; -export * from "./TransferHookActionDestination.js"; -export * from "./TransferHookAction.js"; -export * from "./FunctionCallHookActionMessagesItem.js"; -export * from "./FunctionCallHookAction.js"; -export * from "./SayHookActionPromptItem.js"; -export * from "./SayHookActionPrompt.js"; -export * from "./SayHookAction.js"; -export * from "./CallHookFilter.js"; -export * from "./CallHookCallEnding.js"; -export * from "./CallHookAssistantSpeechInterruptedDoItem.js"; -export * from "./CallHookAssistantSpeechInterrupted.js"; -export * from "./CallHookCustomerSpeechInterruptedDoItem.js"; -export * from "./CallHookCustomerSpeechInterrupted.js"; -export * from "./ToolCallHookActionTool.js"; -export * from "./ToolCallHookAction.js"; -export * from "./CustomerSpeechTimeoutOptions.js"; -export * from "./CallHookCustomerSpeechTimeoutDoItem.js"; -export * from "./CallHookCustomerSpeechTimeout.js"; -export * from "./SqlInjectionSecurityFilter.js"; -export * from "./XssSecurityFilter.js"; -export * from "./SsrfSecurityFilter.js"; -export * from "./RceSecurityFilter.js"; -export * from "./PromptInjectionSecurityFilter.js"; -export * from "./RegexSecurityFilter.js"; -export * from "./CreateAssistantDtoTranscriber.js"; -export * from "./CreateAssistantDtoModel.js"; -export * from "./CreateAssistantDtoVoice.js"; -export * from "./CreateAssistantDtoFirstMessageMode.js"; -export * from "./CreateAssistantDtoVoicemailDetection.js"; -export * from "./CreateAssistantDtoClientMessagesItem.js"; -export * from "./CreateAssistantDtoServerMessagesItem.js"; -export * from "./CreateAssistantDtoBackgroundSoundZero.js"; -export * from "./CreateAssistantDtoBackgroundSound.js"; -export * from "./CreateAssistantDtoCredentialsItem.js"; -export * from "./CreateAssistantDtoHooksItem.js"; -export * from "./CreateAssistantDto.js"; -export * from "./AssistantTranscriber.js"; -export * from "./AssistantModel.js"; -export * from "./AssistantVoice.js"; -export * from "./AssistantFirstMessageMode.js"; -export * from "./AssistantVoicemailDetection.js"; -export * from "./AssistantClientMessagesItem.js"; -export * from "./AssistantServerMessagesItem.js"; -export * from "./AssistantBackgroundSoundZero.js"; -export * from "./AssistantBackgroundSound.js"; -export * from "./AssistantCredentialsItem.js"; -export * from "./AssistantHooksItem.js"; -export * from "./Assistant.js"; -export * from "./PaginationMeta.js"; -export * from "./AssistantPaginatedResponse.js"; -export * from "./AssistantVersionPaginatedResponse.js"; -export * from "./AssistantOverridesTranscriber.js"; -export * from "./AssistantOverridesModel.js"; -export * from "./AssistantOverridesVoice.js"; -export * from "./AssistantOverridesFirstMessageMode.js"; -export * from "./AssistantOverridesVoicemailDetection.js"; -export * from "./AssistantOverridesClientMessagesItem.js"; -export * from "./AssistantOverridesServerMessagesItem.js"; -export * from "./AssistantOverridesBackgroundSoundZero.js"; -export * from "./AssistantOverridesBackgroundSound.js"; -export * from "./AssistantOverridesCredentialsItem.js"; -export * from "./AssistantOverridesHooksItem.js"; -export * from "./AssistantOverridesToolsAppendItem.js"; -export * from "./AssistantOverrides.js"; -export * from "./SquadMemberDtoAssistantDestinationsItem.js"; -export * from "./SquadMemberDto.js"; -export * from "./CreateSquadDto.js"; -export * from "./Squad.js"; -export * from "./WorkflowNodesItem.js"; -export * from "./WorkflowModel.js"; -export * from "./WorkflowTranscriber.js"; -export * from "./WorkflowVoice.js"; -export * from "./WorkflowBackgroundSoundZero.js"; -export * from "./WorkflowBackgroundSound.js"; -export * from "./WorkflowHooksItem.js"; -export * from "./WorkflowCredentialsItem.js"; -export * from "./WorkflowVoicemailDetection.js"; -export * from "./Workflow.js"; -export * from "./CreateWorkflowDtoNodesItem.js"; +export * from "./CreateWebhookCredentialDtoAuthenticationPlan.js"; +export * from "./CreateWorkflowDto.js"; +export * from "./CreateWorkflowDtoBackgroundSound.js"; +export * from "./CreateWorkflowDtoBackgroundSoundZero.js"; +export * from "./CreateWorkflowDtoCredentialsItem.js"; +export * from "./CreateWorkflowDtoHooksItem.js"; export * from "./CreateWorkflowDtoModel.js"; +export * from "./CreateWorkflowDtoNodesItem.js"; export * from "./CreateWorkflowDtoTranscriber.js"; export * from "./CreateWorkflowDtoVoice.js"; -export * from "./CreateWorkflowDtoBackgroundSoundZero.js"; -export * from "./CreateWorkflowDtoBackgroundSound.js"; -export * from "./CreateWorkflowDtoHooksItem.js"; -export * from "./CreateWorkflowDtoCredentialsItem.js"; export * from "./CreateWorkflowDtoVoicemailDetection.js"; -export * from "./CreateWorkflowDto.js"; -export * from "./UpdateWorkflowDtoNodesItem.js"; -export * from "./UpdateWorkflowDtoModel.js"; -export * from "./UpdateWorkflowDtoTranscriber.js"; -export * from "./UpdateWorkflowDtoVoice.js"; -export * from "./UpdateWorkflowDtoBackgroundSoundZero.js"; -export * from "./UpdateWorkflowDtoBackgroundSound.js"; -export * from "./UpdateWorkflowDtoHooksItem.js"; -export * from "./UpdateWorkflowDtoCredentialsItem.js"; -export * from "./UpdateWorkflowDtoVoicemailDetection.js"; -export * from "./UpdateWorkflowDto.js"; -export * from "./AnalysisCostBreakdown.js"; -export * from "./CostBreakdown.js"; -export * from "./Analysis.js"; -export * from "./Monitor.js"; -export * from "./Mono.js"; -export * from "./Recording.js"; -export * from "./NodeArtifactMessagesItem.js"; -export * from "./NodeArtifact.js"; -export * from "./TurnLatency.js"; -export * from "./PerformanceMetrics.js"; -export * from "./ArtifactMessagesItem.js"; -export * from "./Artifact.js"; -export * from "./RecordingConsent.js"; -export * from "./Compliance.js"; -export * from "./WorkflowOverrides.js"; -export * from "./TransferPhoneNumberHookActionDestination.js"; -export * from "./TransferPhoneNumberHookAction.js"; -export * from "./SayPhoneNumberHookAction.js"; -export * from "./PhoneNumberHookCallRingingDoItem.js"; -export * from "./PhoneNumberHookCallRinging.js"; -export * from "./PhoneNumberCallEndingHookFilterOneOfItem.js"; -export * from "./PhoneNumberCallEndingHookFilter.js"; -export * from "./PhoneNumberHookCallEndingDo.js"; -export * from "./PhoneNumberHookCallEnding.js"; -export * from "./ImportTwilioPhoneNumberDtoFallbackDestination.js"; -export * from "./ImportTwilioPhoneNumberDtoHooksItem.js"; -export * from "./ImportTwilioPhoneNumberDto.js"; -export * from "./CreateCustomerDto.js"; -export * from "./SchedulePlan.js"; -export * from "./CallType.js"; -export * from "./CallCostsItem.js"; -export * from "./CallMessagesItem.js"; -export * from "./CallPhoneCallProvider.js"; -export * from "./CallPhoneCallTransport.js"; -export * from "./CallStatus.js"; -export * from "./CallEndedReason.js"; -export * from "./CallDestination.js"; -export * from "./Call.js"; -export * from "./CallBatchError.js"; -export * from "./CallBatchResponse.js"; -export * from "./CallPaginatedResponse.js"; -export * from "./CreateOutboundCallDto.js"; -export * from "./CreateWebCallDto.js"; +export * from "./CreateWorkflowDtoVoicemailDetectionZero.js"; +export * from "./CreateXAiCredentialDto.js"; +export * from "./CredentialActionRequest.js"; +export * from "./CredentialEndUser.js"; +export * from "./CredentialSessionError.js"; +export * from "./CredentialSessionResponse.js"; +export * from "./CredentialWebhookDto.js"; +export * from "./CredentialWebhookDtoAuthMode.js"; +export * from "./CredentialWebhookDtoOperation.js"; +export * from "./CredentialWebhookDtoType.js"; +export * from "./CustomCredential.js"; +export * from "./CustomCredentialAuthenticationPlan.js"; +export * from "./CustomCredentialProvider.js"; +export * from "./CustomEndpointingModelSmartEndpointingPlan.js"; +export * from "./CustomEndpointingModelSmartEndpointingPlanProvider.js"; +export * from "./CustomerCustomEndpointingRule.js"; +export * from "./CustomerCustomEndpointingRuleType.js"; +export * from "./CustomerSpeechTimeoutOptions.js"; +export * from "./CustomKnowledgeBase.js"; +export * from "./CustomKnowledgeBaseProvider.js"; +export * from "./CustomLlmCredential.js"; +export * from "./CustomLlmCredentialProvider.js"; +export * from "./CustomLlmModel.js"; +export * from "./CustomLlmModelMetadataSendMode.js"; +export * from "./CustomLlmModelProvider.js"; +export * from "./CustomLlmModelToolsItem.js"; +export * from "./CustomMessage.js"; +export * from "./CustomMessageType.js"; +export * from "./CustomTranscriber.js"; +export * from "./CustomTranscriberProvider.js"; +export * from "./CustomVoice.js"; +export * from "./CustomVoiceProvider.js"; +export * from "./DeepgramCredential.js"; +export * from "./DeepgramCredentialProvider.js"; +export * from "./DeepgramTranscriber.js"; +export * from "./DeepgramTranscriberLanguage.js"; +export * from "./DeepgramTranscriberModel.js"; +export * from "./DeepgramTranscriberProvider.js"; +export * from "./DeepgramVoice.js"; +export * from "./DeepgramVoiceId.js"; +export * from "./DeepgramVoiceModel.js"; +export * from "./DeepgramVoiceProvider.js"; +export * from "./DeepInfraCredential.js"; +export * from "./DeepInfraCredentialProvider.js"; +export * from "./DeepInfraModel.js"; +export * from "./DeepInfraModelProvider.js"; +export * from "./DeepInfraModelToolsItem.js"; +export * from "./DeepSeekCredential.js"; +export * from "./DeepSeekCredentialProvider.js"; +export * from "./DeepSeekModel.js"; +export * from "./DeepSeekModelModel.js"; +export * from "./DeepSeekModelProvider.js"; +export * from "./DeepSeekModelToolsItem.js"; export * from "./DeveloperMessage.js"; -export * from "./SystemMessage.js"; -export * from "./UserMessage.js"; -export * from "./ToolCallFunction.js"; -export * from "./ToolCall.js"; -export * from "./AssistantMessage.js"; -export * from "./ToolMessage.js"; -export * from "./FunctionCall.js"; -export * from "./ChatInputItem.js"; -export * from "./ChatInput.js"; -export * from "./ChatMessagesItem.js"; -export * from "./ChatOutputItem.js"; -export * from "./ChatCostsItem.js"; -export * from "./Chat.js"; -export * from "./TwilioSmsChatTransport.js"; -export * from "./GetChatPaginatedDtoSortOrder.js"; -export * from "./GetChatPaginatedDto.js"; -export * from "./ChatPaginatedResponse.js"; -export * from "./CreateChatStreamResponse.js"; -export * from "./ChatAssistantOverrides.js"; -export * from "./CreateWebCustomerDto.js"; -export * from "./CreateWebChatDtoInputItem.js"; -export * from "./CreateWebChatDtoInput.js"; -export * from "./CreateWebChatDto.js"; -export * from "./WebChatOutputItem.js"; -export * from "./WebChat.js"; -export * from "./OpenAiWebChatRequestInputItem.js"; -export * from "./OpenAiWebChatRequestInput.js"; -export * from "./OpenAiWebChatRequest.js"; -export * from "./ResponseOutputText.js"; -export * from "./ResponseOutputMessageStatus.js"; -export * from "./ResponseOutputMessage.js"; -export * from "./ResponseObjectStatus.js"; -export * from "./ResponseObject.js"; -export * from "./ResponseTextDeltaEvent.js"; -export * from "./ResponseTextDoneEvent.js"; -export * from "./ResponseCompletedEvent.js"; -export * from "./ResponseErrorEvent.js"; -export * from "./CampaignStatus.js"; -export * from "./CampaignEndedReason.js"; -export * from "./Campaign.js"; -export * from "./CampaignPaginatedResponse.js"; -export * from "./SessionStatus.js"; -export * from "./SessionMessagesItem.js"; -export * from "./Session.js"; -export * from "./GetSessionPaginatedDtoSortOrder.js"; -export * from "./GetSessionPaginatedDto.js"; -export * from "./SessionPaginatedResponse.js"; -export * from "./ByoPhoneNumberFallbackDestination.js"; -export * from "./ByoPhoneNumberHooksItem.js"; -export * from "./ByoPhoneNumberStatus.js"; -export * from "./ByoPhoneNumber.js"; -export * from "./TwilioPhoneNumberFallbackDestination.js"; -export * from "./TwilioPhoneNumberHooksItem.js"; -export * from "./TwilioPhoneNumberStatus.js"; -export * from "./TwilioPhoneNumber.js"; -export * from "./VonagePhoneNumberFallbackDestination.js"; -export * from "./VonagePhoneNumberHooksItem.js"; -export * from "./VonagePhoneNumberStatus.js"; -export * from "./VonagePhoneNumber.js"; -export * from "./SipAuthentication.js"; -export * from "./VapiPhoneNumberFallbackDestination.js"; -export * from "./VapiPhoneNumberHooksItem.js"; -export * from "./VapiPhoneNumberStatus.js"; -export * from "./VapiPhoneNumber.js"; -export * from "./TelnyxPhoneNumberFallbackDestination.js"; -export * from "./TelnyxPhoneNumberHooksItem.js"; -export * from "./TelnyxPhoneNumberStatus.js"; -export * from "./TelnyxPhoneNumber.js"; -export * from "./CreateByoPhoneNumberDtoFallbackDestination.js"; -export * from "./CreateByoPhoneNumberDtoHooksItem.js"; -export * from "./CreateByoPhoneNumberDto.js"; -export * from "./CreateTwilioPhoneNumberDtoFallbackDestination.js"; -export * from "./CreateTwilioPhoneNumberDtoHooksItem.js"; -export * from "./CreateTwilioPhoneNumberDto.js"; -export * from "./CreateVonagePhoneNumberDtoFallbackDestination.js"; -export * from "./CreateVonagePhoneNumberDtoHooksItem.js"; -export * from "./CreateVonagePhoneNumberDto.js"; -export * from "./CreateVapiPhoneNumberDtoFallbackDestination.js"; -export * from "./CreateVapiPhoneNumberDtoHooksItem.js"; -export * from "./CreateVapiPhoneNumberDto.js"; -export * from "./CreateTelnyxPhoneNumberDtoFallbackDestination.js"; -export * from "./CreateTelnyxPhoneNumberDtoHooksItem.js"; -export * from "./CreateTelnyxPhoneNumberDto.js"; -export * from "./UpdateByoPhoneNumberDtoFallbackDestination.js"; -export * from "./UpdateByoPhoneNumberDtoHooksItem.js"; -export * from "./UpdateByoPhoneNumberDto.js"; -export * from "./UpdateTwilioPhoneNumberDtoFallbackDestination.js"; -export * from "./UpdateTwilioPhoneNumberDtoHooksItem.js"; -export * from "./UpdateTwilioPhoneNumberDto.js"; -export * from "./UpdateVonagePhoneNumberDtoFallbackDestination.js"; -export * from "./UpdateVonagePhoneNumberDtoHooksItem.js"; -export * from "./UpdateVonagePhoneNumberDto.js"; -export * from "./UpdateVapiPhoneNumberDtoFallbackDestination.js"; -export * from "./UpdateVapiPhoneNumberDtoHooksItem.js"; -export * from "./UpdateVapiPhoneNumberDto.js"; -export * from "./UpdateTelnyxPhoneNumberDtoFallbackDestination.js"; -export * from "./UpdateTelnyxPhoneNumberDtoHooksItem.js"; -export * from "./UpdateTelnyxPhoneNumberDto.js"; -export * from "./ImportVonagePhoneNumberDtoFallbackDestination.js"; -export * from "./ImportVonagePhoneNumberDtoHooksItem.js"; -export * from "./ImportVonagePhoneNumberDto.js"; -export * from "./PhoneNumberPaginatedResponseResultsItem.js"; -export * from "./PhoneNumberPaginatedResponse.js"; -export * from "./ApiRequestToolMessagesItem.js"; -export * from "./ApiRequestToolMethod.js"; -export * from "./ApiRequestTool.js"; -export * from "./DtmfToolMessagesItem.js"; +export * from "./DeveloperMessageRole.js"; export * from "./DtmfTool.js"; -export * from "./EndCallToolMessagesItem.js"; +export * from "./DtmfToolMessagesItem.js"; +export * from "./Edge.js"; +export * from "./ElevenLabsCredential.js"; +export * from "./ElevenLabsPronunciationDictionary.js"; +export * from "./ElevenLabsPronunciationDictionaryLocator.js"; +export * from "./ElevenLabsPronunciationDictionaryPermissionOnResource.js"; +export * from "./ElevenLabsTranscriber.js"; +export * from "./ElevenLabsTranscriberLanguage.js"; +export * from "./ElevenLabsTranscriberModel.js"; +export * from "./ElevenLabsTranscriberProvider.js"; +export * from "./ElevenLabsVoice.js"; +export * from "./ElevenLabsVoiceId.js"; +export * from "./ElevenLabsVoiceIdEnum.js"; +export * from "./ElevenLabsVoiceModel.js"; export * from "./EndCallTool.js"; -export * from "./FunctionToolMessagesItem.js"; -export * from "./FunctionTool.js"; -export * from "./GhlToolMessagesItem.js"; -export * from "./GhlTool.js"; -export * from "./MakeToolMessagesItem.js"; -export * from "./MakeTool.js"; -export * from "./TransferCallToolMessagesItem.js"; -export * from "./TransferCallToolDestinationsItem.js"; -export * from "./TransferCallTool.js"; -export * from "./HandoffToolMessagesItem.js"; -export * from "./HandoffToolDestinationsItem.js"; -export * from "./HandoffTool.js"; -export * from "./OutputToolMessagesItem.js"; -export * from "./OutputTool.js"; -export * from "./BashToolMessagesItem.js"; -export * from "./BashTool.js"; -export * from "./ComputerToolMessagesItem.js"; -export * from "./ComputerTool.js"; -export * from "./TextEditorToolMessagesItem.js"; -export * from "./TextEditorTool.js"; -export * from "./QueryToolMessagesItem.js"; -export * from "./QueryTool.js"; -export * from "./GoogleCalendarCreateEventToolMessagesItem.js"; -export * from "./GoogleCalendarCreateEventTool.js"; -export * from "./GoogleSheetsRowAppendToolMessagesItem.js"; -export * from "./GoogleSheetsRowAppendTool.js"; -export * from "./GoogleCalendarCheckAvailabilityToolMessagesItem.js"; -export * from "./GoogleCalendarCheckAvailabilityTool.js"; -export * from "./SlackSendMessageToolMessagesItem.js"; -export * from "./SlackSendMessageTool.js"; -export * from "./SmsToolMessagesItem.js"; -export * from "./SmsTool.js"; -export * from "./McpToolMessagesItem.js"; -export * from "./McpTool.js"; -export * from "./GoHighLevelCalendarAvailabilityToolMessagesItem.js"; -export * from "./GoHighLevelCalendarAvailabilityTool.js"; -export * from "./GoHighLevelCalendarEventCreateToolMessagesItem.js"; -export * from "./GoHighLevelCalendarEventCreateTool.js"; -export * from "./GoHighLevelContactCreateToolMessagesItem.js"; -export * from "./GoHighLevelContactCreateTool.js"; -export * from "./GoHighLevelContactGetToolMessagesItem.js"; -export * from "./GoHighLevelContactGetTool.js"; -export * from "./CreateApiRequestToolDtoMessagesItem.js"; -export * from "./CreateApiRequestToolDtoMethod.js"; -export * from "./CreateApiRequestToolDto.js"; -export * from "./CreateOutputToolDtoMessagesItem.js"; -export * from "./CreateOutputToolDto.js"; -export * from "./CreateBashToolDtoMessagesItem.js"; -export * from "./CreateBashToolDto.js"; -export * from "./CreateComputerToolDtoMessagesItem.js"; -export * from "./CreateComputerToolDto.js"; -export * from "./CreateTextEditorToolDtoMessagesItem.js"; -export * from "./CreateTextEditorToolDto.js"; -export * from "./CreateSmsToolDtoMessagesItem.js"; -export * from "./CreateSmsToolDto.js"; -export * from "./UpdateApiRequestToolDtoMessagesItem.js"; -export * from "./UpdateApiRequestToolDtoMethod.js"; -export * from "./UpdateApiRequestToolDto.js"; -export * from "./UpdateDtmfToolDtoMessagesItem.js"; -export * from "./UpdateDtmfToolDto.js"; -export * from "./UpdateEndCallToolDtoMessagesItem.js"; -export * from "./UpdateEndCallToolDto.js"; -export * from "./UpdateFunctionToolDtoMessagesItem.js"; -export * from "./UpdateFunctionToolDto.js"; -export * from "./UpdateGhlToolDtoMessagesItem.js"; -export * from "./UpdateGhlToolDto.js"; -export * from "./UpdateMakeToolDtoMessagesItem.js"; -export * from "./UpdateMakeToolDto.js"; -export * from "./UpdateHandoffToolDtoMessagesItem.js"; -export * from "./UpdateHandoffToolDtoDestinationsItem.js"; -export * from "./UpdateHandoffToolDto.js"; -export * from "./UpdateTransferCallToolDtoMessagesItem.js"; -export * from "./UpdateTransferCallToolDtoDestinationsItem.js"; -export * from "./UpdateTransferCallToolDto.js"; -export * from "./UpdateOutputToolDtoMessagesItem.js"; -export * from "./UpdateOutputToolDto.js"; -export * from "./UpdateBashToolDtoMessagesItem.js"; -export * from "./UpdateBashToolDto.js"; -export * from "./UpdateComputerToolDtoMessagesItem.js"; -export * from "./UpdateComputerToolDto.js"; -export * from "./UpdateTextEditorToolDtoMessagesItem.js"; -export * from "./UpdateTextEditorToolDto.js"; -export * from "./UpdateQueryToolDtoMessagesItem.js"; -export * from "./UpdateQueryToolDto.js"; -export * from "./UpdateGoogleCalendarCreateEventToolDtoMessagesItem.js"; -export * from "./UpdateGoogleCalendarCreateEventToolDto.js"; -export * from "./UpdateGoogleSheetsRowAppendToolDtoMessagesItem.js"; -export * from "./UpdateGoogleSheetsRowAppendToolDto.js"; -export * from "./UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.js"; -export * from "./UpdateGoogleCalendarCheckAvailabilityToolDto.js"; -export * from "./UpdateSlackSendMessageToolDtoMessagesItem.js"; -export * from "./UpdateSlackSendMessageToolDto.js"; -export * from "./UpdateSmsToolDtoMessagesItem.js"; -export * from "./UpdateSmsToolDto.js"; -export * from "./UpdateMcpToolDtoMessagesItem.js"; -export * from "./UpdateMcpToolDto.js"; -export * from "./UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.js"; -export * from "./UpdateGoHighLevelCalendarAvailabilityToolDto.js"; -export * from "./UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem.js"; -export * from "./UpdateGoHighLevelCalendarEventCreateToolDto.js"; -export * from "./UpdateGoHighLevelContactCreateToolDtoMessagesItem.js"; -export * from "./UpdateGoHighLevelContactCreateToolDto.js"; -export * from "./UpdateGoHighLevelContactGetToolDtoMessagesItem.js"; -export * from "./UpdateGoHighLevelContactGetToolDto.js"; -export * from "./FileStatus.js"; -export * from "./File_.js"; -export * from "./TrieveKnowledgeBaseSearchPlanSearchType.js"; -export * from "./TrieveKnowledgeBaseSearchPlan.js"; -export * from "./TrieveKnowledgeBase.js"; -export * from "./CustomKnowledgeBase.js"; -export * from "./CreateTrieveKnowledgeBaseDto.js"; -export * from "./UpdateTrieveKnowledgeBaseDto.js"; -export * from "./UpdateCustomKnowledgeBaseDto.js"; -export * from "./TrieveKnowledgeBaseChunkPlan.js"; -export * from "./TrieveKnowledgeBaseCreate.js"; -export * from "./TrieveKnowledgeBaseImport.js"; -export * from "./StructuredOutputModel.js"; -export * from "./StructuredOutput.js"; -export * from "./StructuredOutputPaginatedResponse.js"; -export * from "./TesterPlan.js"; -export * from "./TestSuitePhoneNumber.js"; -export * from "./TargetPlan.js"; -export * from "./TestSuite.js"; -export * from "./TestSuitesPaginatedResponse.js"; -export * from "./CreateTestSuiteDto.js"; -export * from "./UpdateTestSuiteDto.js"; -export * from "./TestSuiteTestVoice.js"; -export * from "./TestSuiteTestChat.js"; -export * from "./CreateTestSuiteTestVoiceDto.js"; -export * from "./CreateTestSuiteTestChatDto.js"; -export * from "./UpdateTestSuiteTestVoiceDto.js"; -export * from "./UpdateTestSuiteTestChatDto.js"; -export * from "./TestSuiteTestScorerAi.js"; -export * from "./TestSuiteTestsPaginatedResponseResultsItem.js"; -export * from "./TestSuiteTestsPaginatedResponse.js"; -export * from "./TestSuiteRunScorerAiResult.js"; -export * from "./TestSuiteRunScorerAi.js"; -export * from "./TestSuiteRunTestAttemptCall.js"; -export * from "./TestSuiteRunTestAttemptMetadata.js"; -export * from "./TestSuiteRunTestAttempt.js"; -export * from "./TestSuiteRunTestResult.js"; -export * from "./TestSuiteRunStatus.js"; -export * from "./TestSuiteRun.js"; -export * from "./TestSuiteRunsPaginatedResponse.js"; -export * from "./CreateTestSuiteRunDto.js"; -export * from "./UpdateTestSuiteRunDto.js"; -export * from "./CreateEvalDtoMessagesItem.js"; -export * from "./CreateEvalDto.js"; -export * from "./EvalMessagesItem.js"; +export * from "./EndCallToolMessagesItem.js"; export * from "./Eval.js"; -export * from "./EvalModelListOptionsProvider.js"; -export * from "./EvalModelListOptions.js"; -export * from "./EvalUserEditableMessagesItem.js"; -export * from "./EvalUserEditable.js"; -export * from "./ChatEvalAssistantMessageMockToolCall.js"; -export * from "./ChatEvalAssistantMessageMock.js"; -export * from "./ChatEvalSystemMessageMock.js"; -export * from "./ChatEvalToolResponseMessageMock.js"; -export * from "./ChatEvalUserMessageMock.js"; -export * from "./AssistantMessageEvaluationContinuePlan.js"; -export * from "./ChatEvalAssistantMessageEvaluationJudgePlan.js"; -export * from "./ChatEvalAssistantMessageEvaluation.js"; -export * from "./AssistantMessageJudgePlanExact.js"; -export * from "./EvalOpenAiModelModel.js"; -export * from "./EvalOpenAiModel.js"; -export * from "./EvalAnthropicModelModel.js"; export * from "./EvalAnthropicModel.js"; -export * from "./EvalGoogleModelModel.js"; +export * from "./EvalAnthropicModelModel.js"; +export * from "./EvalAnthropicModelProvider.js"; +export * from "./EvalCustomModel.js"; +export * from "./EvalCustomModelProvider.js"; export * from "./EvalGoogleModel.js"; -export * from "./EvalGroqModelModel.js"; +export * from "./EvalGoogleModelModel.js"; +export * from "./EvalGoogleModelProvider.js"; export * from "./EvalGroqModel.js"; -export * from "./EvalCustomModel.js"; -export * from "./AssistantMessageJudgePlanAiModel.js"; -export * from "./AssistantMessageJudgePlanAi.js"; -export * from "./AssistantMessageJudgePlanRegex.js"; -export * from "./GetEvalPaginatedDtoSortOrder.js"; -export * from "./GetEvalPaginatedDto.js"; +export * from "./EvalGroqModelModel.js"; +export * from "./EvalGroqModelProvider.js"; +export * from "./EvalMessagesItem.js"; +export * from "./EvalModelListOptions.js"; +export * from "./EvalModelListOptionsProvider.js"; +export * from "./EvalOpenAiModel.js"; +export * from "./EvalOpenAiModelModel.js"; +export * from "./EvalOpenAiModelProvider.js"; export * from "./EvalPaginatedResponse.js"; -export * from "./EvalRunResultStatus.js"; -export * from "./EvalRunResultMessagesItem.js"; +export * from "./EvalRun.js"; +export * from "./EvalRunEndedReason.js"; +export * from "./EvalRunPaginatedResponse.js"; export * from "./EvalRunResult.js"; +export * from "./EvalRunResultMessagesItem.js"; +export * from "./EvalRunResultStatus.js"; export * from "./EvalRunStatus.js"; -export * from "./EvalRunEndedReason.js"; export * from "./EvalRunTarget.js"; -export * from "./EvalRun.js"; -export * from "./EvalRunPaginatedResponse.js"; -export * from "./GetEvalRunPaginatedDtoSortOrder.js"; -export * from "./GetEvalRunPaginatedDto.js"; export * from "./EvalRunTargetAssistant.js"; +export * from "./EvalRunTargetAssistantType.js"; export * from "./EvalRunTargetSquad.js"; -export * from "./CreateOrgDtoChannel.js"; -export * from "./CreateOrgDto.js"; -export * from "./AutoReloadPlan.js"; -export * from "./InvoicePlan.js"; -export * from "./SubscriptionType.js"; -export * from "./SubscriptionStatus.js"; -export * from "./SubscriptionMinutesIncludedResetFrequency.js"; -export * from "./Subscription.js"; -export * from "./OrgChannel.js"; -export * from "./Org.js"; -export * from "./UpdateOrgDtoChannel.js"; -export * from "./UpdateOrgDto.js"; -export * from "./User.js"; -export * from "./InviteUserDtoRole.js"; -export * from "./InviteUserDto.js"; -export * from "./UpdateUserRoleDtoRole.js"; -export * from "./UpdateUserRoleDto.js"; -export * from "./JwtResponse.js"; -export * from "./TokenRestrictions.js"; -export * from "./CreateTokenDtoTag.js"; -export * from "./CreateTokenDto.js"; -export * from "./TokenTag.js"; -export * from "./Token.js"; -export * from "./UpdateTokenDtoTag.js"; -export * from "./UpdateTokenDto.js"; -export * from "./AnthropicCredential.js"; -export * from "./AnyscaleCredential.js"; -export * from "./AssemblyAiCredential.js"; -export * from "./AzureCredentialService.js"; -export * from "./AzureCredentialRegion.js"; -export * from "./AzureCredential.js"; -export * from "./AzureOpenAiCredentialRegion.js"; -export * from "./AzureOpenAiCredentialModelsItem.js"; -export * from "./AzureOpenAiCredential.js"; -export * from "./ByoSipTrunkCredential.js"; -export * from "./CartesiaCredential.js"; -export * from "./CerebrasCredential.js"; -export * from "./CloudflareCredential.js"; -export * from "./Oauth2AuthenticationSession.js"; -export * from "./CustomLlmCredential.js"; -export * from "./DeepgramCredential.js"; -export * from "./DeepInfraCredential.js"; -export * from "./DeepSeekCredential.js"; -export * from "./ElevenLabsCredential.js"; +export * from "./EvalRunTargetSquadType.js"; +export * from "./EvalRunType.js"; +export * from "./EvalType.js"; +export * from "./EvalUserEditable.js"; +export * from "./EvalUserEditableMessagesItem.js"; +export * from "./EvalUserEditableType.js"; +export * from "./ExactReplacement.js"; +export * from "./ExactReplacementType.js"; +export * from "./FailedEdgeCondition.js"; +export * from "./FallbackAssemblyAiTranscriber.js"; +export * from "./FallbackAssemblyAiTranscriberLanguage.js"; +export * from "./FallbackAssemblyAiTranscriberProvider.js"; +export * from "./FallbackAzureSpeechTranscriber.js"; +export * from "./FallbackAzureSpeechTranscriberLanguage.js"; +export * from "./FallbackAzureSpeechTranscriberProvider.js"; +export * from "./FallbackAzureSpeechTranscriberSegmentationStrategy.js"; +export * from "./FallbackAzureVoice.js"; +export * from "./FallbackAzureVoiceId.js"; +export * from "./FallbackAzureVoiceProvider.js"; +export * from "./FallbackAzureVoiceVoiceIdZero.js"; +export * from "./FallbackCartesiaTranscriber.js"; +export * from "./FallbackCartesiaTranscriberLanguage.js"; +export * from "./FallbackCartesiaTranscriberModel.js"; +export * from "./FallbackCartesiaTranscriberProvider.js"; +export * from "./FallbackCartesiaVoice.js"; +export * from "./FallbackCartesiaVoiceLanguage.js"; +export * from "./FallbackCartesiaVoiceModel.js"; +export * from "./FallbackCartesiaVoiceProvider.js"; +export * from "./FallbackCustomTranscriber.js"; +export * from "./FallbackCustomTranscriberProvider.js"; +export * from "./FallbackCustomVoice.js"; +export * from "./FallbackCustomVoiceProvider.js"; +export * from "./FallbackDeepgramTranscriber.js"; +export * from "./FallbackDeepgramTranscriberLanguage.js"; +export * from "./FallbackDeepgramTranscriberModel.js"; +export * from "./FallbackDeepgramTranscriberProvider.js"; +export * from "./FallbackDeepgramVoice.js"; +export * from "./FallbackDeepgramVoiceId.js"; +export * from "./FallbackDeepgramVoiceModel.js"; +export * from "./FallbackDeepgramVoiceProvider.js"; +export * from "./FallbackElevenLabsTranscriber.js"; +export * from "./FallbackElevenLabsTranscriberLanguage.js"; +export * from "./FallbackElevenLabsTranscriberModel.js"; +export * from "./FallbackElevenLabsTranscriberProvider.js"; +export * from "./FallbackElevenLabsVoice.js"; +export * from "./FallbackElevenLabsVoiceId.js"; +export * from "./FallbackElevenLabsVoiceIdEnum.js"; +export * from "./FallbackElevenLabsVoiceModel.js"; +export * from "./FallbackGladiaTranscriber.js"; +export * from "./FallbackGladiaTranscriberLanguage.js"; +export * from "./FallbackGladiaTranscriberLanguageBehaviour.js"; +export * from "./FallbackGladiaTranscriberLanguages.js"; +export * from "./FallbackGladiaTranscriberModel.js"; +export * from "./FallbackGladiaTranscriberProvider.js"; +export * from "./FallbackGladiaTranscriberRegion.js"; +export * from "./FallbackGoogleTranscriber.js"; +export * from "./FallbackGoogleTranscriberLanguage.js"; +export * from "./FallbackGoogleTranscriberModel.js"; +export * from "./FallbackGoogleTranscriberProvider.js"; +export * from "./FallbackHumeVoice.js"; +export * from "./FallbackHumeVoiceModel.js"; +export * from "./FallbackHumeVoiceProvider.js"; +export * from "./FallbackInworldVoice.js"; +export * from "./FallbackInworldVoiceLanguageCode.js"; +export * from "./FallbackInworldVoiceModel.js"; +export * from "./FallbackInworldVoiceProvider.js"; +export * from "./FallbackInworldVoiceVoiceId.js"; +export * from "./FallbackLmntVoice.js"; +export * from "./FallbackLmntVoiceId.js"; +export * from "./FallbackLmntVoiceIdEnum.js"; +export * from "./FallbackLmntVoiceLanguage.js"; +export * from "./FallbackLmntVoiceProvider.js"; +export * from "./FallbackMinimaxVoice.js"; +export * from "./FallbackMinimaxVoiceLanguageBoost.js"; +export * from "./FallbackMinimaxVoiceModel.js"; +export * from "./FallbackMinimaxVoiceProvider.js"; +export * from "./FallbackMinimaxVoiceRegion.js"; +export * from "./FallbackNeetsVoice.js"; +export * from "./FallbackNeuphonicVoice.js"; +export * from "./FallbackNeuphonicVoiceModel.js"; +export * from "./FallbackNeuphonicVoiceProvider.js"; +export * from "./FallbackOpenAiTranscriber.js"; +export * from "./FallbackOpenAiTranscriberLanguage.js"; +export * from "./FallbackOpenAiTranscriberModel.js"; +export * from "./FallbackOpenAiTranscriberProvider.js"; +export * from "./FallbackOpenAiVoice.js"; +export * from "./FallbackOpenAiVoiceId.js"; +export * from "./FallbackOpenAiVoiceIdEnum.js"; +export * from "./FallbackOpenAiVoiceModel.js"; +export * from "./FallbackOpenAiVoiceProvider.js"; +export * from "./FallbackPlan.js"; +export * from "./FallbackPlanVoicesItem.js"; +export * from "./FallbackPlayHtVoice.js"; +export * from "./FallbackPlayHtVoiceEmotion.js"; +export * from "./FallbackPlayHtVoiceId.js"; +export * from "./FallbackPlayHtVoiceIdEnum.js"; +export * from "./FallbackPlayHtVoiceLanguage.js"; +export * from "./FallbackPlayHtVoiceModel.js"; +export * from "./FallbackPlayHtVoiceProvider.js"; +export * from "./FallbackRimeAiVoice.js"; +export * from "./FallbackRimeAiVoiceId.js"; +export * from "./FallbackRimeAiVoiceIdEnum.js"; +export * from "./FallbackRimeAiVoiceModel.js"; +export * from "./FallbackRimeAiVoiceProvider.js"; +export * from "./FallbackSesameVoice.js"; +export * from "./FallbackSesameVoiceModel.js"; +export * from "./FallbackSesameVoiceProvider.js"; +export * from "./FallbackSmallestAiVoice.js"; +export * from "./FallbackSmallestAiVoiceId.js"; +export * from "./FallbackSmallestAiVoiceIdEnum.js"; +export * from "./FallbackSmallestAiVoiceModel.js"; +export * from "./FallbackSmallestAiVoiceProvider.js"; +export * from "./FallbackSpeechmaticsTranscriber.js"; +export * from "./FallbackSpeechmaticsTranscriberLanguage.js"; +export * from "./FallbackSpeechmaticsTranscriberModel.js"; +export * from "./FallbackSpeechmaticsTranscriberNumeralStyle.js"; +export * from "./FallbackSpeechmaticsTranscriberOperatingPoint.js"; +export * from "./FallbackSpeechmaticsTranscriberProvider.js"; +export * from "./FallbackSpeechmaticsTranscriberRegion.js"; +export * from "./FallbackTalkscriberTranscriber.js"; +export * from "./FallbackTalkscriberTranscriberLanguage.js"; +export * from "./FallbackTalkscriberTranscriberModel.js"; +export * from "./FallbackTalkscriberTranscriberProvider.js"; +export * from "./FallbackTavusVoice.js"; +export * from "./FallbackTavusVoiceProvider.js"; +export * from "./FallbackTavusVoiceVoiceId.js"; +export * from "./FallbackTavusVoiceVoiceIdZero.js"; +export * from "./FallbackTranscriberPlan.js"; +export * from "./FallbackTranscriberPlanTranscribersItem.js"; +export * from "./FallbackVapiVoice.js"; +export * from "./FallbackVapiVoiceProvider.js"; +export * from "./FallbackVapiVoiceVoiceId.js"; +export * from "./File_.js"; +export * from "./FileObject.js"; +export * from "./FileStatus.js"; +export * from "./FilterDateTypeColumnOnCallTable.js"; +export * from "./FilterDateTypeColumnOnCallTableColumn.js"; +export * from "./FilterDateTypeColumnOnCallTableOperator.js"; +export * from "./FilterNumberArrayTypeColumnOnCallTable.js"; +export * from "./FilterNumberArrayTypeColumnOnCallTableColumn.js"; +export * from "./FilterNumberArrayTypeColumnOnCallTableOperator.js"; +export * from "./FilterNumberTypeColumnOnCallTable.js"; +export * from "./FilterNumberTypeColumnOnCallTableColumn.js"; +export * from "./FilterNumberTypeColumnOnCallTableOperator.js"; +export * from "./FilterStringArrayTypeColumnOnCallTable.js"; +export * from "./FilterStringArrayTypeColumnOnCallTableColumn.js"; +export * from "./FilterStringArrayTypeColumnOnCallTableOperator.js"; +export * from "./FilterStringTypeColumnOnCallTable.js"; +export * from "./FilterStringTypeColumnOnCallTableColumn.js"; +export * from "./FilterStringTypeColumnOnCallTableOperator.js"; +export * from "./FilterStructuredOutputColumnOnCallTable.js"; +export * from "./FilterStructuredOutputColumnOnCallTableColumn.js"; +export * from "./FilterStructuredOutputColumnOnCallTableOperator.js"; +export * from "./FormatPlan.js"; +export * from "./FormatPlanFormattersEnabledItem.js"; +export * from "./FormatPlanReplacementsItem.js"; +export * from "./FourierDenoisingPlan.js"; +export * from "./FunctionCall.js"; +export * from "./FunctionCallAssistantHookAction.js"; +export * from "./FunctionCallHookAction.js"; +export * from "./FunctionCallHookActionMessagesItem.js"; +export * from "./FunctionCallHookActionType.js"; +export * from "./FunctionTool.js"; +export * from "./FunctionToolMessagesItem.js"; +export * from "./FunctionToolProviderDetails.js"; +export * from "./FunctionToolProviderDetailsType.js"; +export * from "./FunctionToolWithToolCall.js"; +export * from "./FunctionToolWithToolCallMessagesItem.js"; +export * from "./FunctionToolWithToolCallType.js"; export * from "./GcpCredential.js"; +export * from "./GcpCredentialProvider.js"; +export * from "./GcpKey.js"; +export * from "./GeminiMultimodalLivePrebuiltVoiceConfig.js"; +export * from "./GeminiMultimodalLivePrebuiltVoiceConfigVoiceName.js"; +export * from "./GeminiMultimodalLiveSpeechConfig.js"; +export * from "./GeminiMultimodalLiveVoiceConfig.js"; +export * from "./GetChatPaginatedDto.js"; +export * from "./GetChatPaginatedDtoSortOrder.js"; +export * from "./GetEvalPaginatedDto.js"; +export * from "./GetEvalPaginatedDtoSortOrder.js"; +export * from "./GetEvalRunPaginatedDto.js"; +export * from "./GetEvalRunPaginatedDtoSortOrder.js"; +export * from "./GetSessionPaginatedDto.js"; +export * from "./GetSessionPaginatedDtoSortOrder.js"; +export * from "./GhlTool.js"; +export * from "./GhlToolMessagesItem.js"; +export * from "./GhlToolMetadata.js"; +export * from "./GhlToolProviderDetails.js"; +export * from "./GhlToolProviderDetailsType.js"; +export * from "./GhlToolType.js"; +export * from "./GhlToolWithToolCall.js"; +export * from "./GhlToolWithToolCallMessagesItem.js"; +export * from "./GhlToolWithToolCallType.js"; export * from "./GladiaCredential.js"; +export * from "./GladiaCredentialProvider.js"; +export * from "./GladiaCustomVocabularyConfigDto.js"; +export * from "./GladiaCustomVocabularyConfigDtoVocabularyItem.js"; +export * from "./GladiaTranscriber.js"; +export * from "./GladiaTranscriberLanguage.js"; +export * from "./GladiaTranscriberLanguageBehaviour.js"; +export * from "./GladiaTranscriberLanguages.js"; +export * from "./GladiaTranscriberModel.js"; +export * from "./GladiaTranscriberProvider.js"; +export * from "./GladiaTranscriberRegion.js"; +export * from "./GladiaVocabularyItemDto.js"; +export * from "./GlobalNodePlan.js"; +export * from "./GoHighLevelCalendarAvailabilityTool.js"; +export * from "./GoHighLevelCalendarAvailabilityToolMessagesItem.js"; +export * from "./GoHighLevelCalendarAvailabilityToolProviderDetails.js"; +export * from "./GoHighLevelCalendarAvailabilityToolProviderDetailsType.js"; +export * from "./GoHighLevelCalendarAvailabilityToolWithToolCall.js"; +export * from "./GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem.js"; +export * from "./GoHighLevelCalendarAvailabilityToolWithToolCallType.js"; +export * from "./GoHighLevelCalendarEventCreateTool.js"; +export * from "./GoHighLevelCalendarEventCreateToolMessagesItem.js"; +export * from "./GoHighLevelCalendarEventCreateToolProviderDetails.js"; +export * from "./GoHighLevelCalendarEventCreateToolProviderDetailsType.js"; +export * from "./GoHighLevelCalendarEventCreateToolWithToolCall.js"; +export * from "./GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem.js"; +export * from "./GoHighLevelCalendarEventCreateToolWithToolCallType.js"; +export * from "./GoHighLevelContactCreateTool.js"; +export * from "./GoHighLevelContactCreateToolMessagesItem.js"; +export * from "./GoHighLevelContactCreateToolProviderDetails.js"; +export * from "./GoHighLevelContactCreateToolProviderDetailsType.js"; +export * from "./GoHighLevelContactCreateToolWithToolCall.js"; +export * from "./GoHighLevelContactCreateToolWithToolCallMessagesItem.js"; +export * from "./GoHighLevelContactCreateToolWithToolCallType.js"; +export * from "./GoHighLevelContactGetTool.js"; +export * from "./GoHighLevelContactGetToolMessagesItem.js"; +export * from "./GoHighLevelContactGetToolProviderDetails.js"; +export * from "./GoHighLevelContactGetToolProviderDetailsType.js"; +export * from "./GoHighLevelContactGetToolWithToolCall.js"; +export * from "./GoHighLevelContactGetToolWithToolCallMessagesItem.js"; +export * from "./GoHighLevelContactGetToolWithToolCallType.js"; export * from "./GoHighLevelCredential.js"; +export * from "./GoHighLevelCredentialProvider.js"; +export * from "./GoHighLevelMcpCredential.js"; +export * from "./GoHighLevelMcpCredentialProvider.js"; +export * from "./GoogleCalendarCheckAvailabilityTool.js"; +export * from "./GoogleCalendarCheckAvailabilityToolMessagesItem.js"; +export * from "./GoogleCalendarCreateEventTool.js"; +export * from "./GoogleCalendarCreateEventToolMessagesItem.js"; +export * from "./GoogleCalendarCreateEventToolProviderDetails.js"; +export * from "./GoogleCalendarCreateEventToolProviderDetailsType.js"; +export * from "./GoogleCalendarCreateEventToolWithToolCall.js"; +export * from "./GoogleCalendarCreateEventToolWithToolCallMessagesItem.js"; +export * from "./GoogleCalendarCreateEventToolWithToolCallType.js"; +export * from "./GoogleCalendarOAuth2AuthorizationCredential.js"; +export * from "./GoogleCalendarOAuth2AuthorizationCredentialProvider.js"; +export * from "./GoogleCalendarOAuth2ClientCredential.js"; +export * from "./GoogleCalendarOAuth2ClientCredentialProvider.js"; export * from "./GoogleCredential.js"; +export * from "./GoogleCredentialProvider.js"; +export * from "./GoogleModel.js"; +export * from "./GoogleModelModel.js"; +export * from "./GoogleModelProvider.js"; +export * from "./GoogleModelToolsItem.js"; +export * from "./GoogleRealtimeConfig.js"; +export * from "./GoogleSheetsOAuth2AuthorizationCredential.js"; +export * from "./GoogleSheetsOAuth2AuthorizationCredentialProvider.js"; +export * from "./GoogleSheetsRowAppendTool.js"; +export * from "./GoogleSheetsRowAppendToolMessagesItem.js"; +export * from "./GoogleSheetsRowAppendToolProviderDetails.js"; +export * from "./GoogleSheetsRowAppendToolProviderDetailsType.js"; +export * from "./GoogleSheetsRowAppendToolWithToolCall.js"; +export * from "./GoogleSheetsRowAppendToolWithToolCallMessagesItem.js"; +export * from "./GoogleSheetsRowAppendToolWithToolCallType.js"; +export * from "./GoogleTranscriber.js"; +export * from "./GoogleTranscriberLanguage.js"; +export * from "./GoogleTranscriberModel.js"; +export * from "./GoogleTranscriberProvider.js"; +export * from "./GoogleVoicemailDetectionPlan.js"; +export * from "./GoogleVoicemailDetectionPlanProvider.js"; +export * from "./GoogleVoicemailDetectionPlanType.js"; export * from "./GroqCredential.js"; +export * from "./GroqCredentialProvider.js"; +export * from "./GroqModel.js"; +export * from "./GroqModelModel.js"; +export * from "./GroqModelProvider.js"; +export * from "./GroqModelToolsItem.js"; +export * from "./GroupCondition.js"; +export * from "./GroupConditionConditionsItem.js"; +export * from "./GroupConditionOperator.js"; +export * from "./GroupConditionType.js"; +export * from "./HandoffDestinationAssistant.js"; +export * from "./HandoffDestinationAssistantContextEngineeringPlan.js"; +export * from "./HandoffDestinationAssistantType.js"; +export * from "./HandoffDestinationDynamic.js"; +export * from "./HandoffDestinationDynamicType.js"; +export * from "./HandoffTool.js"; +export * from "./HandoffToolDestinationsItem.js"; +export * from "./HandoffToolMessagesItem.js"; +export * from "./HangupNode.js"; +export * from "./HangupNodeType.js"; +export * from "./HmacAuthenticationPlan.js"; +export * from "./HmacAuthenticationPlanAlgorithm.js"; +export * from "./HmacAuthenticationPlanSignatureEncoding.js"; export * from "./HumeCredential.js"; +export * from "./HumeCredentialProvider.js"; +export * from "./HumeVoice.js"; +export * from "./HumeVoiceModel.js"; +export * from "./HumeVoiceProvider.js"; +export * from "./ImportTwilioPhoneNumberDto.js"; +export * from "./ImportTwilioPhoneNumberDtoFallbackDestination.js"; +export * from "./ImportTwilioPhoneNumberDtoHooksItem.js"; +export * from "./ImportVonagePhoneNumberDto.js"; +export * from "./ImportVonagePhoneNumberDtoFallbackDestination.js"; +export * from "./ImportVonagePhoneNumberDtoHooksItem.js"; export * from "./InflectionAiCredential.js"; +export * from "./InflectionAiCredentialProvider.js"; +export * from "./InflectionAiModel.js"; +export * from "./InflectionAiModelModel.js"; +export * from "./InflectionAiModelProvider.js"; +export * from "./InflectionAiModelToolsItem.js"; +export * from "./Insight.js"; +export * from "./InsightFormula.js"; +export * from "./InsightPaginatedResponse.js"; +export * from "./InsightRunFormatPlan.js"; +export * from "./InsightRunFormatPlanFormat.js"; +export * from "./InsightRunResponse.js"; +export * from "./InsightTimeRange.js"; +export * from "./InsightTimeRangeWithStep.js"; +export * from "./InsightTimeRangeWithStepStep.js"; +export * from "./InsightType.js"; +export * from "./InviteUserDto.js"; +export * from "./InviteUserDtoRole.js"; +export * from "./InvoicePlan.js"; +export * from "./InworldCredential.js"; +export * from "./InworldCredentialProvider.js"; +export * from "./InworldVoice.js"; +export * from "./InworldVoiceLanguageCode.js"; +export * from "./InworldVoiceModel.js"; +export * from "./InworldVoiceProvider.js"; +export * from "./InworldVoiceVoiceId.js"; +export * from "./JsonQueryOnCallTableWithNumberTypeColumn.js"; +export * from "./JsonQueryOnCallTableWithNumberTypeColumnColumn.js"; +export * from "./JsonQueryOnCallTableWithNumberTypeColumnFiltersItem.js"; +export * from "./JsonQueryOnCallTableWithNumberTypeColumnOperation.js"; +export * from "./JsonQueryOnCallTableWithNumberTypeColumnTable.js"; +export * from "./JsonQueryOnCallTableWithNumberTypeColumnType.js"; +export * from "./JsonQueryOnCallTableWithStringTypeColumn.js"; +export * from "./JsonQueryOnCallTableWithStringTypeColumnColumn.js"; +export * from "./JsonQueryOnCallTableWithStringTypeColumnFiltersItem.js"; +export * from "./JsonQueryOnCallTableWithStringTypeColumnOperation.js"; +export * from "./JsonQueryOnCallTableWithStringTypeColumnTable.js"; +export * from "./JsonQueryOnCallTableWithStringTypeColumnType.js"; +export * from "./JsonQueryOnCallTableWithStructuredOutputColumn.js"; +export * from "./JsonQueryOnCallTableWithStructuredOutputColumnColumn.js"; +export * from "./JsonQueryOnCallTableWithStructuredOutputColumnFiltersItem.js"; +export * from "./JsonQueryOnCallTableWithStructuredOutputColumnOperation.js"; +export * from "./JsonQueryOnCallTableWithStructuredOutputColumnTable.js"; +export * from "./JsonQueryOnCallTableWithStructuredOutputColumnType.js"; +export * from "./JsonSchema.js"; +export * from "./JsonSchemaFormat.js"; +export * from "./JsonSchemaType.js"; +export * from "./JwtResponse.js"; +export * from "./KeypadInputPlan.js"; +export * from "./KeypadInputPlanDelimiters.js"; +export * from "./KnowledgeBase.js"; +export * from "./KnowledgeBaseCost.js"; +export * from "./KnowledgeBaseCostType.js"; +export * from "./KnowledgeBaseModel.js"; +export * from "./KnowledgeBaseProvider.js"; +export * from "./KnowledgeBaseResponseDocument.js"; export * from "./LangfuseCredential.js"; +export * from "./LangfuseCredentialProvider.js"; +export * from "./LangfuseObservabilityPlan.js"; +export * from "./LangfuseObservabilityPlanProvider.js"; +export * from "./LineInsight.js"; +export * from "./LineInsightFromCallTable.js"; +export * from "./LineInsightFromCallTableGroupBy.js"; +export * from "./LineInsightFromCallTableQueriesItem.js"; +export * from "./LineInsightFromCallTableType.js"; +export * from "./LineInsightGroupBy.js"; +export * from "./LineInsightMetadata.js"; +export * from "./LineInsightQueriesItem.js"; +export * from "./LiquidCondition.js"; +export * from "./LiquidConditionType.js"; +export * from "./LivekitSmartEndpointingPlan.js"; +export * from "./LivekitSmartEndpointingPlanProvider.js"; export * from "./LmntCredential.js"; -export * from "./MakeCredential.js"; +export * from "./LmntCredentialProvider.js"; +export * from "./LmntVoice.js"; +export * from "./LmntVoiceId.js"; +export * from "./LmntVoiceIdEnum.js"; +export * from "./LmntVoiceLanguage.js"; +export * from "./LmntVoiceProvider.js"; +export * from "./LogicEdgeCondition.js"; +export * from "./MakeCredential.js"; +export * from "./MakeCredentialProvider.js"; +export * from "./MakeTool.js"; +export * from "./MakeToolMessagesItem.js"; +export * from "./MakeToolMetadata.js"; +export * from "./MakeToolProviderDetails.js"; +export * from "./MakeToolProviderDetailsType.js"; +export * from "./MakeToolType.js"; +export * from "./MakeToolWithToolCall.js"; +export * from "./MakeToolWithToolCallMessagesItem.js"; +export * from "./MakeToolWithToolCallType.js"; +export * from "./McpTool.js"; +export * from "./McpToolMessagesItem.js"; +export * from "./McpToolMetadata.js"; +export * from "./McpToolMetadataProtocol.js"; +export * from "./MessageTarget.js"; +export * from "./MessageTargetRole.js"; +export * from "./MinimaxVoice.js"; +export * from "./MinimaxVoiceLanguageBoost.js"; +export * from "./MinimaxVoiceModel.js"; +export * from "./MinimaxVoiceProvider.js"; +export * from "./MinimaxVoiceRegion.js"; export * from "./MistralCredential.js"; +export * from "./MistralCredentialProvider.js"; +export * from "./ModelCost.js"; +export * from "./ModelCostType.js"; +export * from "./Monitor.js"; +export * from "./MonitorPlan.js"; +export * from "./Mono.js"; +export * from "./NeetsVoice.js"; export * from "./NeuphonicCredential.js"; +export * from "./NeuphonicCredentialProvider.js"; +export * from "./NeuphonicVoice.js"; +export * from "./NeuphonicVoiceModel.js"; +export * from "./NeuphonicVoiceProvider.js"; +export * from "./NodeArtifact.js"; +export * from "./NodeArtifactMessagesItem.js"; +export * from "./OAuth2AuthenticationPlan.js"; +export * from "./Oauth2AuthenticationSession.js"; export * from "./OpenAiCredential.js"; +export * from "./OpenAiCredentialProvider.js"; +export * from "./OpenAiFunction.js"; +export * from "./OpenAiFunctionParameters.js"; +export * from "./OpenAiFunctionParametersType.js"; +export * from "./OpenAiMessage.js"; +export * from "./OpenAiMessageRole.js"; +export * from "./OpenAiModel.js"; +export * from "./OpenAiModelFallbackModelsItem.js"; +export * from "./OpenAiModelModel.js"; +export * from "./OpenAiModelProvider.js"; +export * from "./OpenAiModelToolStrictCompatibilityMode.js"; +export * from "./OpenAiModelToolsItem.js"; +export * from "./OpenAiTranscriber.js"; +export * from "./OpenAiTranscriberLanguage.js"; +export * from "./OpenAiTranscriberModel.js"; +export * from "./OpenAiTranscriberProvider.js"; +export * from "./OpenAiVoice.js"; +export * from "./OpenAiVoiceId.js"; +export * from "./OpenAiVoiceIdEnum.js"; +export * from "./OpenAiVoiceModel.js"; +export * from "./OpenAiVoicemailDetectionPlan.js"; +export * from "./OpenAiVoicemailDetectionPlanProvider.js"; +export * from "./OpenAiVoicemailDetectionPlanType.js"; +export * from "./OpenAiVoiceProvider.js"; +export * from "./OpenAiWebChatRequest.js"; +export * from "./OpenAiWebChatRequestInput.js"; +export * from "./OpenAiWebChatRequestInputOneItem.js"; export * from "./OpenRouterCredential.js"; +export * from "./OpenRouterCredentialProvider.js"; +export * from "./OpenRouterModel.js"; +export * from "./OpenRouterModelProvider.js"; +export * from "./OpenRouterModelToolsItem.js"; +export * from "./Org.js"; +export * from "./OrgChannel.js"; +export * from "./OutputTool.js"; +export * from "./OutputToolMessagesItem.js"; +export * from "./OutputToolType.js"; +export * from "./PaginationMeta.js"; +export * from "./PerformanceMetrics.js"; export * from "./PerplexityAiCredential.js"; +export * from "./PerplexityAiCredentialProvider.js"; +export * from "./PerplexityAiModel.js"; +export * from "./PerplexityAiModelProvider.js"; +export * from "./PerplexityAiModelToolsItem.js"; +export * from "./PhoneNumberCallEndingHookFilter.js"; +export * from "./PhoneNumberCallEndingHookFilterKey.js"; +export * from "./PhoneNumberCallEndingHookFilterOneOfItem.js"; +export * from "./PhoneNumberCallEndingHookFilterType.js"; +export * from "./PhoneNumberHookCallEnding.js"; +export * from "./PhoneNumberHookCallEndingDo.js"; +export * from "./PhoneNumberHookCallEndingOn.js"; +export * from "./PhoneNumberHookCallRinging.js"; +export * from "./PhoneNumberHookCallRingingDoItem.js"; +export * from "./PhoneNumberHookCallRingingOn.js"; +export * from "./PhoneNumberPaginatedResponse.js"; +export * from "./PhoneNumberPaginatedResponseResultsItem.js"; +export * from "./PieInsight.js"; +export * from "./PieInsightFromCallTable.js"; +export * from "./PieInsightFromCallTableGroupBy.js"; +export * from "./PieInsightFromCallTableQueriesItem.js"; +export * from "./PieInsightFromCallTableType.js"; +export * from "./PieInsightGroupBy.js"; +export * from "./PieInsightQueriesItem.js"; export * from "./PlayHtCredential.js"; +export * from "./PlayHtCredentialProvider.js"; +export * from "./PlayHtVoice.js"; +export * from "./PlayHtVoiceEmotion.js"; +export * from "./PlayHtVoiceId.js"; +export * from "./PlayHtVoiceIdEnum.js"; +export * from "./PlayHtVoiceLanguage.js"; +export * from "./PlayHtVoiceModel.js"; +export * from "./PlayHtVoiceProvider.js"; +export * from "./PromptInjectionSecurityFilter.js"; +export * from "./PromptInjectionSecurityFilterType.js"; +export * from "./ProviderResource.js"; +export * from "./ProviderResourcePaginatedResponse.js"; +export * from "./ProviderResourceProvider.js"; +export * from "./ProviderResourceResourceName.js"; +export * from "./PunctuationBoundary.js"; +export * from "./QueryTool.js"; +export * from "./QueryToolMessagesItem.js"; +export * from "./RceSecurityFilter.js"; +export * from "./RceSecurityFilterType.js"; +export * from "./Recording.js"; +export * from "./RecordingConsent.js"; +export * from "./RecordingConsentPlanStayOnLine.js"; +export * from "./RecordingConsentPlanStayOnLineVoice.js"; +export * from "./RecordingConsentPlanVerbal.js"; +export * from "./RecordingConsentPlanVerbalVoice.js"; +export * from "./RegexCondition.js"; +export * from "./RegexConditionType.js"; +export * from "./RegexOption.js"; +export * from "./RegexOptionType.js"; +export * from "./RegexReplacement.js"; +export * from "./RegexReplacementType.js"; +export * from "./RegexSecurityFilter.js"; +export * from "./RegexSecurityFilterType.js"; +export * from "./ResponseCompletedEvent.js"; +export * from "./ResponseCompletedEventType.js"; +export * from "./ResponseErrorEvent.js"; +export * from "./ResponseErrorEventType.js"; +export * from "./ResponseObject.js"; +export * from "./ResponseObjectObject.js"; +export * from "./ResponseObjectStatus.js"; +export * from "./ResponseOutputMessage.js"; +export * from "./ResponseOutputMessageRole.js"; +export * from "./ResponseOutputMessageStatus.js"; +export * from "./ResponseOutputMessageType.js"; +export * from "./ResponseOutputText.js"; +export * from "./ResponseOutputTextType.js"; +export * from "./ResponseTextDeltaEvent.js"; +export * from "./ResponseTextDeltaEventType.js"; +export * from "./ResponseTextDoneEvent.js"; +export * from "./ResponseTextDoneEventType.js"; export * from "./RimeAiCredential.js"; +export * from "./RimeAiCredentialProvider.js"; +export * from "./RimeAiVoice.js"; +export * from "./RimeAiVoiceId.js"; +export * from "./RimeAiVoiceIdEnum.js"; +export * from "./RimeAiVoiceModel.js"; +export * from "./RimeAiVoiceProvider.js"; export * from "./RunpodCredential.js"; +export * from "./RunpodCredentialProvider.js"; export * from "./S3Credential.js"; +export * from "./S3CredentialProvider.js"; +export * from "./SayAssistantHookAction.js"; +export * from "./SayHookAction.js"; +export * from "./SayHookActionPrompt.js"; +export * from "./SayHookActionPromptOneItem.js"; +export * from "./SayHookActionType.js"; +export * from "./SayPhoneNumberHookAction.js"; +export * from "./SayPhoneNumberHookActionType.js"; +export * from "./SbcConfiguration.js"; +export * from "./SchedulePlan.js"; +export * from "./Scorecard.js"; +export * from "./ScorecardMetric.js"; +export * from "./ScorecardPaginatedResponse.js"; +export * from "./SecurityFilterBase.js"; +export * from "./SecurityFilterPlan.js"; +export * from "./SecurityFilterPlanMode.js"; +export * from "./Server.js"; +export * from "./ServerMessage.js"; +export * from "./ServerMessageAssistantRequest.js"; +export * from "./ServerMessageAssistantRequestPhoneNumber.js"; +export * from "./ServerMessageAssistantRequestType.js"; +export * from "./ServerMessageCallDeleted.js"; +export * from "./ServerMessageCallDeletedPhoneNumber.js"; +export * from "./ServerMessageCallDeletedType.js"; +export * from "./ServerMessageCallDeleteFailed.js"; +export * from "./ServerMessageCallDeleteFailedPhoneNumber.js"; +export * from "./ServerMessageCallDeleteFailedType.js"; +export * from "./ServerMessageCallEndpointingRequest.js"; +export * from "./ServerMessageCallEndpointingRequestMessagesItem.js"; +export * from "./ServerMessageCallEndpointingRequestPhoneNumber.js"; +export * from "./ServerMessageCallEndpointingRequestType.js"; +export * from "./ServerMessageChatCreated.js"; +export * from "./ServerMessageChatCreatedPhoneNumber.js"; +export * from "./ServerMessageChatCreatedType.js"; +export * from "./ServerMessageChatDeleted.js"; +export * from "./ServerMessageChatDeletedPhoneNumber.js"; +export * from "./ServerMessageChatDeletedType.js"; +export * from "./ServerMessageConversationUpdate.js"; +export * from "./ServerMessageConversationUpdateMessagesItem.js"; +export * from "./ServerMessageConversationUpdatePhoneNumber.js"; +export * from "./ServerMessageConversationUpdateType.js"; +export * from "./ServerMessageEndOfCallReport.js"; +export * from "./ServerMessageEndOfCallReportCostsItem.js"; +export * from "./ServerMessageEndOfCallReportEndedReason.js"; +export * from "./ServerMessageEndOfCallReportPhoneNumber.js"; +export * from "./ServerMessageEndOfCallReportType.js"; +export * from "./ServerMessageHandoffDestinationRequest.js"; +export * from "./ServerMessageHandoffDestinationRequestPhoneNumber.js"; +export * from "./ServerMessageHandoffDestinationRequestType.js"; +export * from "./ServerMessageHang.js"; +export * from "./ServerMessageHangPhoneNumber.js"; +export * from "./ServerMessageHangType.js"; +export * from "./ServerMessageKnowledgeBaseRequest.js"; +export * from "./ServerMessageKnowledgeBaseRequestMessagesItem.js"; +export * from "./ServerMessageKnowledgeBaseRequestPhoneNumber.js"; +export * from "./ServerMessageKnowledgeBaseRequestType.js"; +export * from "./ServerMessageLanguageChangeDetected.js"; +export * from "./ServerMessageLanguageChangeDetectedPhoneNumber.js"; +export * from "./ServerMessageLanguageChangeDetectedType.js"; +export * from "./ServerMessageMessage.js"; +export * from "./ServerMessageModelOutput.js"; +export * from "./ServerMessageModelOutputPhoneNumber.js"; +export * from "./ServerMessageModelOutputType.js"; +export * from "./ServerMessagePhoneCallControl.js"; +export * from "./ServerMessagePhoneCallControlDestination.js"; +export * from "./ServerMessagePhoneCallControlPhoneNumber.js"; +export * from "./ServerMessagePhoneCallControlRequest.js"; +export * from "./ServerMessagePhoneCallControlType.js"; +export * from "./ServerMessageResponse.js"; +export * from "./ServerMessageResponseAssistantRequest.js"; +export * from "./ServerMessageResponseAssistantRequestDestination.js"; +export * from "./ServerMessageResponseCallEndpointingRequest.js"; +export * from "./ServerMessageResponseHandoffDestinationRequest.js"; +export * from "./ServerMessageResponseKnowledgeBaseRequest.js"; +export * from "./ServerMessageResponseMessageResponse.js"; +export * from "./ServerMessageResponseToolCalls.js"; +export * from "./ServerMessageResponseTransferDestinationRequest.js"; +export * from "./ServerMessageResponseTransferDestinationRequestDestination.js"; +export * from "./ServerMessageResponseTransferDestinationRequestMessage.js"; +export * from "./ServerMessageResponseVoiceRequest.js"; +export * from "./ServerMessageSessionCreated.js"; +export * from "./ServerMessageSessionCreatedPhoneNumber.js"; +export * from "./ServerMessageSessionCreatedType.js"; +export * from "./ServerMessageSessionDeleted.js"; +export * from "./ServerMessageSessionDeletedPhoneNumber.js"; +export * from "./ServerMessageSessionDeletedType.js"; +export * from "./ServerMessageSessionUpdated.js"; +export * from "./ServerMessageSessionUpdatedPhoneNumber.js"; +export * from "./ServerMessageSessionUpdatedType.js"; +export * from "./ServerMessageSpeechUpdate.js"; +export * from "./ServerMessageSpeechUpdatePhoneNumber.js"; +export * from "./ServerMessageSpeechUpdateRole.js"; +export * from "./ServerMessageSpeechUpdateStatus.js"; +export * from "./ServerMessageSpeechUpdateType.js"; +export * from "./ServerMessageStatusUpdate.js"; +export * from "./ServerMessageStatusUpdateDestination.js"; +export * from "./ServerMessageStatusUpdateEndedReason.js"; +export * from "./ServerMessageStatusUpdateMessagesItem.js"; +export * from "./ServerMessageStatusUpdatePhoneNumber.js"; +export * from "./ServerMessageStatusUpdateStatus.js"; +export * from "./ServerMessageStatusUpdateType.js"; +export * from "./ServerMessageToolCalls.js"; +export * from "./ServerMessageToolCallsPhoneNumber.js"; +export * from "./ServerMessageToolCallsToolWithToolCallListItem.js"; +export * from "./ServerMessageToolCallsType.js"; +export * from "./ServerMessageTranscript.js"; +export * from "./ServerMessageTranscriptPhoneNumber.js"; +export * from "./ServerMessageTranscriptRole.js"; +export * from "./ServerMessageTranscriptTranscriptType.js"; +export * from "./ServerMessageTranscriptType.js"; +export * from "./ServerMessageTransferDestinationRequest.js"; +export * from "./ServerMessageTransferDestinationRequestPhoneNumber.js"; +export * from "./ServerMessageTransferDestinationRequestType.js"; +export * from "./ServerMessageTransferUpdate.js"; +export * from "./ServerMessageTransferUpdateDestination.js"; +export * from "./ServerMessageTransferUpdatePhoneNumber.js"; +export * from "./ServerMessageTransferUpdateType.js"; +export * from "./ServerMessageUserInterrupted.js"; +export * from "./ServerMessageUserInterruptedPhoneNumber.js"; +export * from "./ServerMessageUserInterruptedType.js"; +export * from "./ServerMessageVoiceInput.js"; +export * from "./ServerMessageVoiceInputPhoneNumber.js"; +export * from "./ServerMessageVoiceInputType.js"; +export * from "./ServerMessageVoiceRequest.js"; +export * from "./ServerMessageVoiceRequestPhoneNumber.js"; +export * from "./ServerMessageVoiceRequestType.js"; +export * from "./SesameVoice.js"; +export * from "./SesameVoiceModel.js"; +export * from "./SesameVoiceProvider.js"; +export * from "./Session.js"; +export * from "./SessionCost.js"; +export * from "./SessionCostsItem.js"; +export * from "./SessionCostType.js"; +export * from "./SessionMessagesItem.js"; +export * from "./SessionPaginatedResponse.js"; +export * from "./SessionStatus.js"; +export * from "./SipAuthentication.js"; +export * from "./SipTrunkGateway.js"; +export * from "./SipTrunkGatewayOutboundProtocol.js"; +export * from "./SipTrunkOutboundAuthenticationPlan.js"; +export * from "./SipTrunkOutboundSipRegisterPlan.js"; +export * from "./SlackOAuth2AuthorizationCredential.js"; +export * from "./SlackOAuth2AuthorizationCredentialProvider.js"; +export * from "./SlackSendMessageTool.js"; +export * from "./SlackSendMessageToolMessagesItem.js"; export * from "./SmallestAiCredential.js"; +export * from "./SmallestAiCredentialProvider.js"; +export * from "./SmallestAiVoice.js"; +export * from "./SmallestAiVoiceId.js"; +export * from "./SmallestAiVoiceIdEnum.js"; +export * from "./SmallestAiVoiceModel.js"; +export * from "./SmallestAiVoiceProvider.js"; +export * from "./SmartDenoisingPlan.js"; +export * from "./SmsTool.js"; +export * from "./SmsToolMessagesItem.js"; export * from "./SpeechmaticsCredential.js"; +export * from "./SpeechmaticsCredentialProvider.js"; +export * from "./SpeechmaticsCustomVocabularyItem.js"; +export * from "./SpeechmaticsTranscriber.js"; +export * from "./SpeechmaticsTranscriberLanguage.js"; +export * from "./SpeechmaticsTranscriberModel.js"; +export * from "./SpeechmaticsTranscriberNumeralStyle.js"; +export * from "./SpeechmaticsTranscriberOperatingPoint.js"; +export * from "./SpeechmaticsTranscriberProvider.js"; +export * from "./SpeechmaticsTranscriberRegion.js"; +export * from "./SqlInjectionSecurityFilter.js"; +export * from "./SqlInjectionSecurityFilterType.js"; +export * from "./Squad.js"; +export * from "./SquadMemberDto.js"; +export * from "./SquadMemberDtoAssistantDestinationsItem.js"; +export * from "./SsrfSecurityFilter.js"; +export * from "./SsrfSecurityFilterType.js"; +export * from "./StartSpeakingPlan.js"; +export * from "./StartSpeakingPlanCustomEndpointingRulesItem.js"; +export * from "./StartSpeakingPlanSmartEndpointingEnabled.js"; +export * from "./StartSpeakingPlanSmartEndpointingEnabledOne.js"; +export * from "./StartSpeakingPlanSmartEndpointingPlan.js"; +export * from "./StopSpeakingPlan.js"; +export * from "./StructuredDataMultiPlan.js"; +export * from "./StructuredDataPlan.js"; +export * from "./StructuredOutput.js"; +export * from "./StructuredOutputFilterDto.js"; +export * from "./StructuredOutputModel.js"; +export * from "./StructuredOutputPaginatedResponse.js"; +export * from "./Subscription.js"; +export * from "./SubscriptionLimits.js"; +export * from "./SubscriptionMinutesIncludedResetFrequency.js"; +export * from "./SubscriptionStatus.js"; +export * from "./SubscriptionType.js"; +export * from "./SuccessEvaluationPlan.js"; +export * from "./SuccessEvaluationPlanRubric.js"; +export * from "./SummaryPlan.js"; +export * from "./SupabaseBucketPlan.js"; +export * from "./SupabaseBucketPlanRegion.js"; export * from "./SupabaseCredential.js"; -export * from "./TavusCredential.js"; -export * from "./TogetherAiCredential.js"; -export * from "./TrieveCredential.js"; -export * from "./TwilioCredential.js"; -export * from "./VonageCredential.js"; -export * from "./WebhookCredentialAuthenticationPlan.js"; -export * from "./WebhookCredential.js"; -export * from "./CustomCredentialAuthenticationPlan.js"; -export * from "./CustomCredential.js"; -export * from "./XAiCredential.js"; -export * from "./GoogleCalendarOAuth2ClientCredential.js"; -export * from "./GoogleCalendarOAuth2AuthorizationCredential.js"; -export * from "./GoogleSheetsOAuth2AuthorizationCredential.js"; -export * from "./SlackOAuth2AuthorizationCredential.js"; -export * from "./GoHighLevelMcpCredential.js"; -export * from "./InworldCredential.js"; -export * from "./CreateCerebrasCredentialDto.js"; -export * from "./CreateGoogleCredentialDto.js"; -export * from "./CreateHumeCredentialDto.js"; -export * from "./CreateInflectionAiCredentialDto.js"; -export * from "./CreateMistralCredentialDto.js"; -export * from "./CreateNeuphonicCredentialDto.js"; -export * from "./CreateSpeechmaticsCredentialDto.js"; -export * from "./CreateTrieveCredentialDto.js"; -export * from "./CreateCustomCredentialDtoAuthenticationPlan.js"; -export * from "./CreateCustomCredentialDto.js"; -export * from "./CreateGoHighLevelMcpCredentialDto.js"; -export * from "./CreateInworldCredentialDto.js"; +export * from "./SupabaseCredentialProvider.js"; +export * from "./SyncVoiceLibraryDto.js"; +export * from "./SyncVoiceLibraryDtoProvidersItem.js"; +export * from "./SystemMessage.js"; +export * from "./TalkscriberTranscriber.js"; +export * from "./TalkscriberTranscriberLanguage.js"; +export * from "./TalkscriberTranscriberModel.js"; +export * from "./TalkscriberTranscriberProvider.js"; +export * from "./TargetPlan.js"; +export * from "./TavusConversationProperties.js"; +export * from "./TavusCredential.js"; +export * from "./TavusCredentialProvider.js"; +export * from "./TavusVoice.js"; +export * from "./TavusVoiceProvider.js"; +export * from "./TavusVoiceVoiceId.js"; +export * from "./TavusVoiceVoiceIdZero.js"; +export * from "./TelnyxPhoneNumber.js"; +export * from "./TelnyxPhoneNumberFallbackDestination.js"; +export * from "./TelnyxPhoneNumberHooksItem.js"; +export * from "./TelnyxPhoneNumberStatus.js"; +export * from "./Template.js"; +export * from "./TemplateDetails.js"; +export * from "./TemplateProvider.js"; +export * from "./TemplateProviderDetails.js"; +export * from "./TemplateType.js"; +export * from "./TemplateVisibility.js"; +export * from "./TesterPlan.js"; +export * from "./TestSuite.js"; +export * from "./TestSuitePhoneNumber.js"; +export * from "./TestSuitePhoneNumberProvider.js"; +export * from "./TestSuiteRun.js"; +export * from "./TestSuiteRunScorerAi.js"; +export * from "./TestSuiteRunScorerAiResult.js"; +export * from "./TestSuiteRunScorerAiType.js"; +export * from "./TestSuiteRunStatus.js"; +export * from "./TestSuiteRunsPaginatedResponse.js"; +export * from "./TestSuiteRunTestAttempt.js"; +export * from "./TestSuiteRunTestAttemptCall.js"; +export * from "./TestSuiteRunTestAttemptMetadata.js"; +export * from "./TestSuiteRunTestResult.js"; +export * from "./TestSuitesPaginatedResponse.js"; +export * from "./TestSuiteTestChat.js"; +export * from "./TestSuiteTestChatType.js"; +export * from "./TestSuiteTestScorerAi.js"; +export * from "./TestSuiteTestScorerAiType.js"; +export * from "./TestSuiteTestsPaginatedResponse.js"; +export * from "./TestSuiteTestsPaginatedResponseResultsItem.js"; +export * from "./TestSuiteTestVoice.js"; +export * from "./TestSuiteTestVoiceType.js"; +export * from "./TextContent.js"; +export * from "./TextContentLanguage.js"; +export * from "./TextContentType.js"; +export * from "./TextEditorTool.js"; +export * from "./TextEditorToolMessagesItem.js"; +export * from "./TextEditorToolName.js"; +export * from "./TextEditorToolSubType.js"; +export * from "./TextEditorToolWithToolCall.js"; +export * from "./TextEditorToolWithToolCallMessagesItem.js"; +export * from "./TextEditorToolWithToolCallName.js"; +export * from "./TextEditorToolWithToolCallSubType.js"; +export * from "./TextEditorToolWithToolCallType.js"; +export * from "./TextInsight.js"; +export * from "./TextInsightFromCallTable.js"; +export * from "./TextInsightFromCallTableQueriesItem.js"; +export * from "./TextInsightFromCallTableType.js"; +export * from "./TextInsightQueriesItem.js"; +export * from "./TimeRange.js"; +export * from "./TimeRangeStep.js"; +export * from "./TogetherAiCredential.js"; +export * from "./TogetherAiCredentialProvider.js"; +export * from "./TogetherAiModel.js"; +export * from "./TogetherAiModelProvider.js"; +export * from "./TogetherAiModelToolsItem.js"; +export * from "./Token.js"; +export * from "./TokenRestrictions.js"; +export * from "./TokenTag.js"; +export * from "./ToolCall.js"; +export * from "./ToolCallFunction.js"; +export * from "./ToolCallHookAction.js"; +export * from "./ToolCallHookActionTool.js"; +export * from "./ToolCallHookActionType.js"; +export * from "./ToolCallMessage.js"; +export * from "./ToolCallResult.js"; +export * from "./ToolCallResultMessage.js"; +export * from "./ToolMessage.js"; +export * from "./ToolMessageComplete.js"; +export * from "./ToolMessageCompleteRole.js"; +export * from "./ToolMessageCompleteType.js"; +export * from "./ToolMessageDelayed.js"; +export * from "./ToolMessageDelayedType.js"; +export * from "./ToolMessageFailed.js"; +export * from "./ToolMessageFailedType.js"; +export * from "./ToolMessageRole.js"; +export * from "./ToolMessageStart.js"; +export * from "./ToolMessageStartType.js"; +export * from "./ToolNode.js"; +export * from "./ToolNodeTool.js"; +export * from "./ToolNodeType.js"; +export * from "./ToolRejectionPlan.js"; +export * from "./ToolRejectionPlanConditionsItem.js"; +export * from "./ToolTemplateMetadata.js"; +export * from "./ToolTemplateSetup.js"; +export * from "./TranscriberCost.js"; +export * from "./TranscriberCostType.js"; +export * from "./TranscriptionEndpointingPlan.js"; +export * from "./TranscriptPlan.js"; +export * from "./TransferAssistant.js"; +export * from "./TransferAssistantBackgroundSound.js"; +export * from "./TransferAssistantBackgroundSoundZero.js"; +export * from "./TransferAssistantFirstMessageMode.js"; +export * from "./TransferAssistantHookAction.js"; +export * from "./TransferAssistantModel.js"; +export * from "./TransferAssistantModelProvider.js"; +export * from "./TransferAssistantTranscriber.js"; +export * from "./TransferAssistantVoice.js"; +export * from "./TransferCallTool.js"; +export * from "./TransferCallToolDestinationsItem.js"; +export * from "./TransferCallToolMessagesItem.js"; +export * from "./TransferCancelToolUserEditable.js"; +export * from "./TransferCancelToolUserEditableMessagesItem.js"; +export * from "./TransferCancelToolUserEditableType.js"; +export * from "./TransferDestinationAssistant.js"; +export * from "./TransferDestinationAssistantMessage.js"; +export * from "./TransferDestinationAssistantType.js"; +export * from "./TransferDestinationNumber.js"; +export * from "./TransferDestinationNumberMessage.js"; +export * from "./TransferDestinationNumberType.js"; +export * from "./TransferDestinationSip.js"; +export * from "./TransferDestinationSipMessage.js"; +export * from "./TransferDestinationSipType.js"; +export * from "./TransferFallbackPlan.js"; +export * from "./TransferFallbackPlanMessage.js"; +export * from "./TransferHookAction.js"; +export * from "./TransferHookActionDestination.js"; +export * from "./TransferHookActionType.js"; +export * from "./TransferMode.js"; +export * from "./TransferPhoneNumberHookAction.js"; +export * from "./TransferPhoneNumberHookActionDestination.js"; +export * from "./TransferPhoneNumberHookActionType.js"; +export * from "./TransferPlan.js"; +export * from "./TransferPlanContextEngineeringPlan.js"; +export * from "./TransferPlanMessage.js"; +export * from "./TransferPlanMode.js"; +export * from "./TransferSuccessfulToolUserEditable.js"; +export * from "./TransferSuccessfulToolUserEditableMessagesItem.js"; +export * from "./TransferSuccessfulToolUserEditableType.js"; +export * from "./TransportConfigurationTwilio.js"; +export * from "./TransportConfigurationTwilioProvider.js"; +export * from "./TransportConfigurationTwilioRecordingChannels.js"; +export * from "./TransportCost.js"; +export * from "./TransportCostProvider.js"; +export * from "./TransportCostType.js"; +export * from "./TrieveCredential.js"; +export * from "./TrieveCredentialProvider.js"; +export * from "./TrieveKnowledgeBase.js"; +export * from "./TrieveKnowledgeBaseChunkPlan.js"; +export * from "./TrieveKnowledgeBaseCreate.js"; +export * from "./TrieveKnowledgeBaseCreateType.js"; +export * from "./TrieveKnowledgeBaseImport.js"; +export * from "./TrieveKnowledgeBaseImportType.js"; +export * from "./TrieveKnowledgeBaseProvider.js"; +export * from "./TrieveKnowledgeBaseSearchPlan.js"; +export * from "./TrieveKnowledgeBaseSearchPlanSearchType.js"; +export * from "./TurnLatency.js"; +export * from "./TwilioCredential.js"; +export * from "./TwilioCredentialProvider.js"; +export * from "./TwilioPhoneNumber.js"; +export * from "./TwilioPhoneNumberFallbackDestination.js"; +export * from "./TwilioPhoneNumberHooksItem.js"; +export * from "./TwilioPhoneNumberStatus.js"; +export * from "./TwilioSmsChatTransport.js"; +export * from "./TwilioSmsChatTransportConversationType.js"; +export * from "./TwilioSmsChatTransportType.js"; +export * from "./TwilioVoicemailDetectionPlan.js"; +export * from "./TwilioVoicemailDetectionPlanProvider.js"; +export * from "./TwilioVoicemailDetectionPlanVoicemailDetectionTypesItem.js"; export * from "./UpdateAnthropicCredentialDto.js"; export * from "./UpdateAnyscaleCredentialDto.js"; +export * from "./UpdateApiRequestToolDto.js"; +export * from "./UpdateApiRequestToolDtoMessagesItem.js"; +export * from "./UpdateApiRequestToolDtoMethod.js"; export * from "./UpdateAssemblyAiCredentialDto.js"; -export * from "./UpdateAzureCredentialDtoService.js"; -export * from "./UpdateAzureCredentialDtoRegion.js"; export * from "./UpdateAzureCredentialDto.js"; -export * from "./UpdateAzureOpenAiCredentialDtoRegion.js"; -export * from "./UpdateAzureOpenAiCredentialDtoModelsItem.js"; +export * from "./UpdateAzureCredentialDtoRegion.js"; +export * from "./UpdateAzureCredentialDtoService.js"; export * from "./UpdateAzureOpenAiCredentialDto.js"; +export * from "./UpdateAzureOpenAiCredentialDtoModelsItem.js"; +export * from "./UpdateAzureOpenAiCredentialDtoRegion.js"; +export * from "./UpdateBarInsightFromCallTableDto.js"; +export * from "./UpdateBarInsightFromCallTableDtoGroupBy.js"; +export * from "./UpdateBarInsightFromCallTableDtoQueriesItem.js"; +export * from "./UpdateBashToolDto.js"; +export * from "./UpdateBashToolDtoMessagesItem.js"; +export * from "./UpdateBashToolDtoName.js"; +export * from "./UpdateBashToolDtoSubType.js"; +export * from "./UpdateByoPhoneNumberDto.js"; +export * from "./UpdateByoPhoneNumberDtoFallbackDestination.js"; +export * from "./UpdateByoPhoneNumberDtoHooksItem.js"; export * from "./UpdateByoSipTrunkCredentialDto.js"; export * from "./UpdateCartesiaCredentialDto.js"; export * from "./UpdateCerebrasCredentialDto.js"; export * from "./UpdateCloudflareCredentialDto.js"; +export * from "./UpdateComputerToolDto.js"; +export * from "./UpdateComputerToolDtoMessagesItem.js"; +export * from "./UpdateComputerToolDtoName.js"; +export * from "./UpdateComputerToolDtoSubType.js"; +export * from "./UpdateCustomCredentialDto.js"; +export * from "./UpdateCustomCredentialDtoAuthenticationPlan.js"; +export * from "./UpdateCustomKnowledgeBaseDto.js"; export * from "./UpdateCustomLlmCredentialDto.js"; export * from "./UpdateDeepgramCredentialDto.js"; export * from "./UpdateDeepInfraCredentialDto.js"; export * from "./UpdateDeepSeekCredentialDto.js"; +export * from "./UpdateDtmfToolDto.js"; +export * from "./UpdateDtmfToolDtoMessagesItem.js"; export * from "./UpdateElevenLabsCredentialDto.js"; +export * from "./UpdateEndCallToolDto.js"; +export * from "./UpdateEndCallToolDtoMessagesItem.js"; +export * from "./UpdateFunctionToolDto.js"; +export * from "./UpdateFunctionToolDtoMessagesItem.js"; export * from "./UpdateGcpCredentialDto.js"; +export * from "./UpdateGhlToolDto.js"; +export * from "./UpdateGhlToolDtoMessagesItem.js"; export * from "./UpdateGladiaCredentialDto.js"; +export * from "./UpdateGoHighLevelCalendarAvailabilityToolDto.js"; +export * from "./UpdateGoHighLevelCalendarAvailabilityToolDtoMessagesItem.js"; +export * from "./UpdateGoHighLevelCalendarEventCreateToolDto.js"; +export * from "./UpdateGoHighLevelCalendarEventCreateToolDtoMessagesItem.js"; +export * from "./UpdateGoHighLevelContactCreateToolDto.js"; +export * from "./UpdateGoHighLevelContactCreateToolDtoMessagesItem.js"; +export * from "./UpdateGoHighLevelContactGetToolDto.js"; +export * from "./UpdateGoHighLevelContactGetToolDtoMessagesItem.js"; export * from "./UpdateGoHighLevelCredentialDto.js"; +export * from "./UpdateGoHighLevelMcpCredentialDto.js"; +export * from "./UpdateGoogleCalendarCheckAvailabilityToolDto.js"; +export * from "./UpdateGoogleCalendarCheckAvailabilityToolDtoMessagesItem.js"; +export * from "./UpdateGoogleCalendarCreateEventToolDto.js"; +export * from "./UpdateGoogleCalendarCreateEventToolDtoMessagesItem.js"; +export * from "./UpdateGoogleCalendarOAuth2AuthorizationCredentialDto.js"; +export * from "./UpdateGoogleCalendarOAuth2ClientCredentialDto.js"; export * from "./UpdateGoogleCredentialDto.js"; +export * from "./UpdateGoogleSheetsOAuth2AuthorizationCredentialDto.js"; +export * from "./UpdateGoogleSheetsRowAppendToolDto.js"; +export * from "./UpdateGoogleSheetsRowAppendToolDtoMessagesItem.js"; export * from "./UpdateGroqCredentialDto.js"; +export * from "./UpdateHandoffToolDto.js"; +export * from "./UpdateHandoffToolDtoDestinationsItem.js"; +export * from "./UpdateHandoffToolDtoMessagesItem.js"; export * from "./UpdateHumeCredentialDto.js"; export * from "./UpdateInflectionAiCredentialDto.js"; +export * from "./UpdateInworldCredentialDto.js"; export * from "./UpdateLangfuseCredentialDto.js"; +export * from "./UpdateLineInsightFromCallTableDto.js"; +export * from "./UpdateLineInsightFromCallTableDtoGroupBy.js"; +export * from "./UpdateLineInsightFromCallTableDtoQueriesItem.js"; export * from "./UpdateLmntCredentialDto.js"; export * from "./UpdateMakeCredentialDto.js"; +export * from "./UpdateMakeToolDto.js"; +export * from "./UpdateMakeToolDtoMessagesItem.js"; +export * from "./UpdateMcpToolDto.js"; +export * from "./UpdateMcpToolDtoMessagesItem.js"; export * from "./UpdateMistralCredentialDto.js"; export * from "./UpdateNeuphonicCredentialDto.js"; export * from "./UpdateOpenAiCredentialDto.js"; export * from "./UpdateOpenRouterCredentialDto.js"; +export * from "./UpdateOrgDto.js"; +export * from "./UpdateOrgDtoChannel.js"; +export * from "./UpdateOutputToolDto.js"; +export * from "./UpdateOutputToolDtoMessagesItem.js"; export * from "./UpdatePerplexityAiCredentialDto.js"; +export * from "./UpdatePieInsightFromCallTableDto.js"; +export * from "./UpdatePieInsightFromCallTableDtoGroupBy.js"; +export * from "./UpdatePieInsightFromCallTableDtoQueriesItem.js"; export * from "./UpdatePlayHtCredentialDto.js"; +export * from "./UpdateQueryToolDto.js"; +export * from "./UpdateQueryToolDtoMessagesItem.js"; export * from "./UpdateRimeAiCredentialDto.js"; export * from "./UpdateRunpodCredentialDto.js"; export * from "./UpdateS3CredentialDto.js"; +export * from "./UpdateSlackOAuth2AuthorizationCredentialDto.js"; +export * from "./UpdateSlackSendMessageToolDto.js"; +export * from "./UpdateSlackSendMessageToolDtoMessagesItem.js"; export * from "./UpdateSmallestAiCredentialDto.js"; +export * from "./UpdateSmsToolDto.js"; +export * from "./UpdateSmsToolDtoMessagesItem.js"; export * from "./UpdateSpeechmaticsCredentialDto.js"; export * from "./UpdateSupabaseCredentialDto.js"; export * from "./UpdateTavusCredentialDto.js"; +export * from "./UpdateTelnyxPhoneNumberDto.js"; +export * from "./UpdateTelnyxPhoneNumberDtoFallbackDestination.js"; +export * from "./UpdateTelnyxPhoneNumberDtoHooksItem.js"; +export * from "./UpdateTestSuiteDto.js"; +export * from "./UpdateTestSuiteRunDto.js"; +export * from "./UpdateTestSuiteTestChatDto.js"; +export * from "./UpdateTestSuiteTestChatDtoType.js"; +export * from "./UpdateTestSuiteTestVoiceDto.js"; +export * from "./UpdateTestSuiteTestVoiceDtoType.js"; +export * from "./UpdateTextEditorToolDto.js"; +export * from "./UpdateTextEditorToolDtoMessagesItem.js"; +export * from "./UpdateTextEditorToolDtoName.js"; +export * from "./UpdateTextEditorToolDtoSubType.js"; +export * from "./UpdateTextInsightFromCallTableDto.js"; +export * from "./UpdateTextInsightFromCallTableDtoQueriesItem.js"; export * from "./UpdateTogetherAiCredentialDto.js"; +export * from "./UpdateTokenDto.js"; +export * from "./UpdateTokenDtoTag.js"; +export * from "./UpdateToolTemplateDto.js"; +export * from "./UpdateToolTemplateDtoDetails.js"; +export * from "./UpdateToolTemplateDtoProvider.js"; +export * from "./UpdateToolTemplateDtoProviderDetails.js"; +export * from "./UpdateToolTemplateDtoType.js"; +export * from "./UpdateToolTemplateDtoVisibility.js"; +export * from "./UpdateTransferCallToolDto.js"; +export * from "./UpdateTransferCallToolDtoDestinationsItem.js"; +export * from "./UpdateTransferCallToolDtoMessagesItem.js"; export * from "./UpdateTrieveCredentialDto.js"; +export * from "./UpdateTrieveKnowledgeBaseDto.js"; export * from "./UpdateTwilioCredentialDto.js"; +export * from "./UpdateTwilioPhoneNumberDto.js"; +export * from "./UpdateTwilioPhoneNumberDtoFallbackDestination.js"; +export * from "./UpdateTwilioPhoneNumberDtoHooksItem.js"; +export * from "./UpdateUserRoleDto.js"; +export * from "./UpdateUserRoleDtoRole.js"; +export * from "./UpdateVapiPhoneNumberDto.js"; +export * from "./UpdateVapiPhoneNumberDtoFallbackDestination.js"; +export * from "./UpdateVapiPhoneNumberDtoHooksItem.js"; export * from "./UpdateVonageCredentialDto.js"; -export * from "./UpdateWebhookCredentialDtoAuthenticationPlan.js"; +export * from "./UpdateVonagePhoneNumberDto.js"; +export * from "./UpdateVonagePhoneNumberDtoFallbackDestination.js"; +export * from "./UpdateVonagePhoneNumberDtoHooksItem.js"; export * from "./UpdateWebhookCredentialDto.js"; -export * from "./UpdateCustomCredentialDtoAuthenticationPlan.js"; -export * from "./UpdateCustomCredentialDto.js"; +export * from "./UpdateWebhookCredentialDtoAuthenticationPlan.js"; +export * from "./UpdateWorkflowDto.js"; +export * from "./UpdateWorkflowDtoBackgroundSound.js"; +export * from "./UpdateWorkflowDtoBackgroundSoundZero.js"; +export * from "./UpdateWorkflowDtoCredentialsItem.js"; +export * from "./UpdateWorkflowDtoHooksItem.js"; +export * from "./UpdateWorkflowDtoModel.js"; +export * from "./UpdateWorkflowDtoNodesItem.js"; +export * from "./UpdateWorkflowDtoTranscriber.js"; +export * from "./UpdateWorkflowDtoVoice.js"; +export * from "./UpdateWorkflowDtoVoicemailDetection.js"; +export * from "./UpdateWorkflowDtoVoicemailDetectionZero.js"; export * from "./UpdateXAiCredentialDto.js"; -export * from "./UpdateGoogleCalendarOAuth2ClientCredentialDto.js"; -export * from "./UpdateGoogleCalendarOAuth2AuthorizationCredentialDto.js"; -export * from "./UpdateGoogleSheetsOAuth2AuthorizationCredentialDto.js"; -export * from "./UpdateSlackOAuth2AuthorizationCredentialDto.js"; -export * from "./UpdateGoHighLevelMcpCredentialDto.js"; -export * from "./UpdateInworldCredentialDto.js"; -export * from "./CredentialSessionResponse.js"; -export * from "./CredentialEndUser.js"; -export * from "./CredentialSessionError.js"; -export * from "./CredentialWebhookDtoType.js"; -export * from "./CredentialWebhookDtoOperation.js"; -export * from "./CredentialWebhookDtoAuthMode.js"; -export * from "./CredentialWebhookDto.js"; -export * from "./CredentialActionRequest.js"; -export * from "./HmacAuthenticationPlanAlgorithm.js"; -export * from "./HmacAuthenticationPlanSignatureEncoding.js"; -export * from "./HmacAuthenticationPlan.js"; -export * from "./BearerAuthenticationPlan.js"; -export * from "./ToolTemplateSetup.js"; -export * from "./MakeToolProviderDetails.js"; -export * from "./GhlToolProviderDetails.js"; -export * from "./FunctionToolProviderDetails.js"; -export * from "./GoogleCalendarCreateEventToolProviderDetails.js"; -export * from "./GoogleSheetsRowAppendToolProviderDetails.js"; -export * from "./GoHighLevelCalendarAvailabilityToolProviderDetails.js"; -export * from "./GoHighLevelCalendarEventCreateToolProviderDetails.js"; -export * from "./GoHighLevelContactCreateToolProviderDetails.js"; -export * from "./GoHighLevelContactGetToolProviderDetails.js"; -export * from "./ToolTemplateMetadata.js"; -export * from "./CreateToolTemplateDtoDetails.js"; -export * from "./CreateToolTemplateDtoProviderDetails.js"; -export * from "./CreateToolTemplateDtoVisibility.js"; -export * from "./CreateToolTemplateDtoProvider.js"; -export * from "./CreateToolTemplateDto.js"; -export * from "./TemplateDetails.js"; -export * from "./TemplateProviderDetails.js"; -export * from "./TemplateVisibility.js"; -export * from "./TemplateProvider.js"; -export * from "./Template.js"; -export * from "./UpdateToolTemplateDtoDetails.js"; -export * from "./UpdateToolTemplateDtoProviderDetails.js"; -export * from "./UpdateToolTemplateDtoVisibility.js"; -export * from "./UpdateToolTemplateDtoProvider.js"; -export * from "./UpdateToolTemplateDto.js"; -export * from "./VoiceLibraryGender.js"; -export * from "./VoiceLibrary.js"; -export * from "./SyncVoiceLibraryDtoProvidersItem.js"; -export * from "./SyncVoiceLibraryDto.js"; -export * from "./CreateSesameVoiceDto.js"; -export * from "./ElevenLabsPronunciationDictionaryPermissionOnResource.js"; -export * from "./ElevenLabsPronunciationDictionary.js"; -export * from "./ProviderResource.js"; -export * from "./ProviderResourcePaginatedResponse.js"; -export * from "./VoiceLibraryVoiceResponse.js"; -export * from "./AddVoiceToProviderDto.js"; -export * from "./CloneVoiceDto.js"; +export * from "./User.js"; +export * from "./UserMessage.js"; +export * from "./VapiCost.js"; +export * from "./VapiCostSubType.js"; +export * from "./VapiCostType.js"; +export * from "./VapiModel.js"; +export * from "./VapiModelProvider.js"; +export * from "./VapiModelToolsItem.js"; +export * from "./VapiPhoneNumber.js"; +export * from "./VapiPhoneNumberFallbackDestination.js"; +export * from "./VapiPhoneNumberHooksItem.js"; +export * from "./VapiPhoneNumberStatus.js"; +export * from "./VapiSmartEndpointingPlan.js"; +export * from "./VapiSmartEndpointingPlanProvider.js"; +export * from "./VapiVoice.js"; +export * from "./VapiVoicemailDetectionPlan.js"; +export * from "./VapiVoicemailDetectionPlanProvider.js"; +export * from "./VapiVoicemailDetectionPlanType.js"; +export * from "./VapiVoiceProvider.js"; +export * from "./VapiVoiceVoiceId.js"; +export * from "./VariableExtractionAlias.js"; +export * from "./VariableExtractionPlan.js"; export * from "./VariableValueGroupBy.js"; -export * from "./TimeRangeStep.js"; -export * from "./TimeRange.js"; -export * from "./AnalyticsOperationOperation.js"; -export * from "./AnalyticsOperationColumn.js"; -export * from "./AnalyticsOperation.js"; -export * from "./AnalyticsQueryTable.js"; -export * from "./AnalyticsQueryGroupByItem.js"; -export * from "./AnalyticsQuery.js"; -export * from "./AnalyticsQueryResult.js"; -export * from "./ClientMessageWorkflowNodeStartedPhoneNumber.js"; -export * from "./ClientMessageWorkflowNodeStarted.js"; -export * from "./ClientMessageConversationUpdatePhoneNumber.js"; -export * from "./ClientMessageConversationUpdateMessagesItem.js"; -export * from "./ClientMessageConversationUpdate.js"; -export * from "./ClientMessageHangPhoneNumber.js"; -export * from "./ClientMessageHang.js"; -export * from "./ClientMessageMetadataPhoneNumber.js"; -export * from "./ClientMessageMetadata.js"; -export * from "./ClientMessageModelOutputPhoneNumber.js"; -export * from "./ClientMessageModelOutput.js"; -export * from "./ClientMessageSpeechUpdatePhoneNumber.js"; -export * from "./ClientMessageSpeechUpdateStatus.js"; -export * from "./ClientMessageSpeechUpdateRole.js"; -export * from "./ClientMessageSpeechUpdate.js"; -export * from "./ClientMessageTranscriptPhoneNumber.js"; -export * from "./ClientMessageTranscriptType.js"; -export * from "./ClientMessageTranscriptRole.js"; -export * from "./ClientMessageTranscriptTranscriptType.js"; -export * from "./ClientMessageTranscript.js"; -export * from "./ClientMessageToolCallsPhoneNumber.js"; -export * from "./ClientMessageToolCallsToolWithToolCallListItem.js"; -export * from "./ClientMessageToolCalls.js"; -export * from "./ClientMessageToolCallsResultPhoneNumber.js"; -export * from "./ClientMessageToolCallsResult.js"; -export * from "./ClientMessageTransferUpdatePhoneNumber.js"; -export * from "./ClientMessageTransferUpdateDestination.js"; -export * from "./ClientMessageTransferUpdate.js"; -export * from "./ClientMessageUserInterruptedPhoneNumber.js"; -export * from "./ClientMessageUserInterrupted.js"; -export * from "./ClientMessageLanguageChangeDetectedPhoneNumber.js"; -export * from "./ClientMessageLanguageChangeDetected.js"; -export * from "./ClientMessageVoiceInputPhoneNumber.js"; -export * from "./ClientMessageVoiceInput.js"; -export * from "./ClientMessageChatCreatedPhoneNumber.js"; -export * from "./ClientMessageChatCreated.js"; -export * from "./ClientMessageChatDeletedPhoneNumber.js"; -export * from "./ClientMessageChatDeleted.js"; -export * from "./ClientMessageSessionCreatedPhoneNumber.js"; -export * from "./ClientMessageSessionCreated.js"; -export * from "./ClientMessageSessionUpdatedPhoneNumber.js"; -export * from "./ClientMessageSessionUpdated.js"; -export * from "./ClientMessageSessionDeletedPhoneNumber.js"; -export * from "./ClientMessageSessionDeleted.js"; -export * from "./ClientMessageCallDeletedPhoneNumber.js"; -export * from "./ClientMessageCallDeleted.js"; -export * from "./ClientMessageCallDeleteFailedPhoneNumber.js"; -export * from "./ClientMessageCallDeleteFailed.js"; -export * from "./ClientMessageMessage.js"; -export * from "./ClientMessage.js"; -export * from "./ServerMessageAssistantRequestPhoneNumber.js"; -export * from "./ServerMessageAssistantRequest.js"; -export * from "./ServerMessageConversationUpdatePhoneNumber.js"; -export * from "./ServerMessageConversationUpdateMessagesItem.js"; -export * from "./ServerMessageConversationUpdate.js"; -export * from "./ServerMessageEndOfCallReportPhoneNumber.js"; -export * from "./ServerMessageEndOfCallReportEndedReason.js"; -export * from "./ServerMessageEndOfCallReportCostsItem.js"; -export * from "./ServerMessageEndOfCallReport.js"; -export * from "./ServerMessageHandoffDestinationRequestPhoneNumber.js"; -export * from "./ServerMessageHandoffDestinationRequest.js"; -export * from "./ServerMessageHangPhoneNumber.js"; -export * from "./ServerMessageHang.js"; -export * from "./ServerMessageKnowledgeBaseRequestPhoneNumber.js"; -export * from "./ServerMessageKnowledgeBaseRequestMessagesItem.js"; -export * from "./ServerMessageKnowledgeBaseRequest.js"; -export * from "./ServerMessageModelOutputPhoneNumber.js"; -export * from "./ServerMessageModelOutput.js"; -export * from "./ServerMessagePhoneCallControlPhoneNumber.js"; -export * from "./ServerMessagePhoneCallControlRequest.js"; -export * from "./ServerMessagePhoneCallControlDestination.js"; -export * from "./ServerMessagePhoneCallControl.js"; -export * from "./ServerMessageSpeechUpdatePhoneNumber.js"; -export * from "./ServerMessageSpeechUpdateStatus.js"; -export * from "./ServerMessageSpeechUpdateRole.js"; -export * from "./ServerMessageSpeechUpdate.js"; -export * from "./ServerMessageStatusUpdatePhoneNumber.js"; -export * from "./ServerMessageStatusUpdateStatus.js"; -export * from "./ServerMessageStatusUpdateEndedReason.js"; -export * from "./ServerMessageStatusUpdateMessagesItem.js"; -export * from "./ServerMessageStatusUpdateDestination.js"; -export * from "./ServerMessageStatusUpdate.js"; -export * from "./ServerMessageToolCallsPhoneNumber.js"; -export * from "./ServerMessageToolCallsToolWithToolCallListItem.js"; -export * from "./ServerMessageToolCalls.js"; -export * from "./ServerMessageTransferDestinationRequestPhoneNumber.js"; -export * from "./ServerMessageTransferDestinationRequest.js"; -export * from "./ServerMessageTransferUpdatePhoneNumber.js"; -export * from "./ServerMessageTransferUpdateDestination.js"; -export * from "./ServerMessageTransferUpdate.js"; -export * from "./ServerMessageTranscriptPhoneNumber.js"; -export * from "./ServerMessageTranscriptType.js"; -export * from "./ServerMessageTranscriptRole.js"; -export * from "./ServerMessageTranscriptTranscriptType.js"; -export * from "./ServerMessageTranscript.js"; -export * from "./ServerMessageUserInterruptedPhoneNumber.js"; -export * from "./ServerMessageUserInterrupted.js"; -export * from "./ServerMessageLanguageChangeDetectedPhoneNumber.js"; -export * from "./ServerMessageLanguageChangeDetected.js"; -export * from "./ServerMessageVoiceInputPhoneNumber.js"; -export * from "./ServerMessageVoiceInput.js"; -export * from "./ServerMessageVoiceRequestPhoneNumber.js"; -export * from "./ServerMessageVoiceRequest.js"; -export * from "./ServerMessageCallEndpointingRequestPhoneNumber.js"; -export * from "./ServerMessageCallEndpointingRequestMessagesItem.js"; -export * from "./ServerMessageCallEndpointingRequest.js"; -export * from "./ServerMessageChatCreatedPhoneNumber.js"; -export * from "./ServerMessageChatCreated.js"; -export * from "./ServerMessageChatDeletedPhoneNumber.js"; -export * from "./ServerMessageChatDeleted.js"; -export * from "./ServerMessageSessionCreatedPhoneNumber.js"; -export * from "./ServerMessageSessionCreated.js"; -export * from "./ServerMessageSessionUpdatedPhoneNumber.js"; -export * from "./ServerMessageSessionUpdated.js"; -export * from "./ServerMessageSessionDeletedPhoneNumber.js"; -export * from "./ServerMessageSessionDeleted.js"; -export * from "./ServerMessageCallDeletedPhoneNumber.js"; -export * from "./ServerMessageCallDeleted.js"; -export * from "./ServerMessageCallDeleteFailedPhoneNumber.js"; -export * from "./ServerMessageCallDeleteFailed.js"; -export * from "./ServerMessageMessage.js"; -export * from "./ServerMessage.js"; -export * from "./ServerMessageResponseAssistantRequestDestination.js"; -export * from "./ServerMessageResponseAssistantRequest.js"; -export * from "./ServerMessageResponseHandoffDestinationRequest.js"; -export * from "./KnowledgeBaseResponseDocument.js"; -export * from "./ServerMessageResponseKnowledgeBaseRequest.js"; -export * from "./ToolCallResultMessage.js"; -export * from "./ToolCallResult.js"; -export * from "./ServerMessageResponseToolCalls.js"; -export * from "./ServerMessageResponseTransferDestinationRequestDestination.js"; -export * from "./ServerMessageResponseTransferDestinationRequestMessage.js"; -export * from "./ServerMessageResponseTransferDestinationRequest.js"; -export * from "./ServerMessageResponseVoiceRequest.js"; -export * from "./ServerMessageResponseCallEndpointingRequest.js"; -export * from "./ServerMessageResponseMessageResponse.js"; -export * from "./ServerMessageResponse.js"; -export * from "./ClientInboundMessageAddMessage.js"; -export * from "./ClientInboundMessageControlControl.js"; -export * from "./ClientInboundMessageControl.js"; -export * from "./ClientInboundMessageSay.js"; -export * from "./ClientInboundMessageEndCall.js"; -export * from "./ClientInboundMessageTransferDestination.js"; -export * from "./ClientInboundMessageTransfer.js"; -export * from "./ClientInboundMessageMessage.js"; -export * from "./ClientInboundMessage.js"; -export * from "./BotMessage.js"; -export * from "./ToolCallMessage.js"; -export * from "./TransportCostProvider.js"; -export * from "./TransportCost.js"; -export * from "./TranscriberCost.js"; -export * from "./ModelCost.js"; export * from "./VoiceCost.js"; -export * from "./VapiCostSubType.js"; -export * from "./VapiCost.js"; -export * from "./AnalysisCostAnalysisType.js"; -export * from "./AnalysisCost.js"; -export * from "./VoicemailDetectionCostProvider.js"; +export * from "./VoiceCostType.js"; +export * from "./VoiceLibrary.js"; +export * from "./VoiceLibraryGender.js"; +export * from "./VoiceLibraryVoiceResponse.js"; +export * from "./VoicemailDetectionBackoffPlan.js"; export * from "./VoicemailDetectionCost.js"; -export * from "./KnowledgeBaseCost.js"; -export * from "./ChatCost.js"; -export * from "./FunctionToolWithToolCallMessagesItem.js"; -export * from "./FunctionToolWithToolCall.js"; -export * from "./GhlToolWithToolCallMessagesItem.js"; -export * from "./GhlToolWithToolCall.js"; -export * from "./MakeToolWithToolCallMessagesItem.js"; -export * from "./MakeToolWithToolCall.js"; -export * from "./BashToolWithToolCallMessagesItem.js"; -export * from "./BashToolWithToolCall.js"; -export * from "./ComputerToolWithToolCallMessagesItem.js"; -export * from "./ComputerToolWithToolCall.js"; -export * from "./TextEditorToolWithToolCallMessagesItem.js"; -export * from "./TextEditorToolWithToolCall.js"; -export * from "./GoogleCalendarCreateEventToolWithToolCallMessagesItem.js"; -export * from "./GoogleCalendarCreateEventToolWithToolCall.js"; -export * from "./GoogleSheetsRowAppendToolWithToolCallMessagesItem.js"; -export * from "./GoogleSheetsRowAppendToolWithToolCall.js"; -export * from "./GoHighLevelCalendarAvailabilityToolWithToolCallMessagesItem.js"; -export * from "./GoHighLevelCalendarAvailabilityToolWithToolCall.js"; -export * from "./GoHighLevelCalendarEventCreateToolWithToolCallMessagesItem.js"; -export * from "./GoHighLevelCalendarEventCreateToolWithToolCall.js"; -export * from "./GoHighLevelContactCreateToolWithToolCallMessagesItem.js"; -export * from "./GoHighLevelContactCreateToolWithToolCall.js"; -export * from "./GoHighLevelContactGetToolWithToolCallMessagesItem.js"; -export * from "./GoHighLevelContactGetToolWithToolCall.js"; -export * from "./AssistantUserEditable.js"; -export * from "./FallbackNeetsVoice.js"; -export * from "./NeetsVoice.js"; -export * from "./DeepgramTranscriberLanguage.js"; -export * from "./DeepgramTranscriberModel.js"; -export * from "./FallbackDeepgramTranscriberLanguage.js"; -export * from "./FallbackDeepgramTranscriberModel.js"; -export * from "./TransferMode.js"; -export * from "./PunctuationBoundary.js"; -export * from "./LogicEdgeCondition.js"; -export * from "./FailedEdgeCondition.js"; -export * from "./TransferAssistantHookAction.js"; -export * from "./FunctionCallAssistantHookAction.js"; -export * from "./SayAssistantHookAction.js"; -export * from "./AssistantHookCallEnding.js"; -export * from "./AssistantHookAssistantSpeechInterrupted.js"; -export * from "./AssistantHookCustomerSpeechInterrupted.js"; +export * from "./VoicemailDetectionCostProvider.js"; +export * from "./VoicemailDetectionCostType.js"; +export * from "./VonageCredential.js"; +export * from "./VonageCredentialProvider.js"; +export * from "./VonagePhoneNumber.js"; +export * from "./VonagePhoneNumberFallbackDestination.js"; +export * from "./VonagePhoneNumberHooksItem.js"; +export * from "./VonagePhoneNumberStatus.js"; +export * from "./WebChat.js"; +export * from "./WebChatOutputItem.js"; +export * from "./WebhookCredential.js"; +export * from "./WebhookCredentialAuthenticationPlan.js"; +export * from "./WebhookCredentialProvider.js"; +export * from "./Workflow.js"; +export * from "./WorkflowAnthropicModel.js"; +export * from "./WorkflowAnthropicModelModel.js"; +export * from "./WorkflowAnthropicModelProvider.js"; +export * from "./WorkflowBackgroundSound.js"; +export * from "./WorkflowBackgroundSoundZero.js"; +export * from "./WorkflowCredentialsItem.js"; +export * from "./WorkflowCustomModel.js"; +export * from "./WorkflowCustomModelMetadataSendMode.js"; +export * from "./WorkflowCustomModelProvider.js"; +export * from "./WorkflowGoogleModel.js"; +export * from "./WorkflowGoogleModelModel.js"; +export * from "./WorkflowGoogleModelProvider.js"; +export * from "./WorkflowHooksItem.js"; +export * from "./WorkflowModel.js"; +export * from "./WorkflowNodesItem.js"; +export * from "./WorkflowOpenAiModel.js"; +export * from "./WorkflowOpenAiModelModel.js"; +export * from "./WorkflowOpenAiModelProvider.js"; +export * from "./WorkflowOverrides.js"; +export * from "./WorkflowTranscriber.js"; +export * from "./WorkflowUserEditable.js"; +export * from "./WorkflowUserEditableBackgroundSound.js"; +export * from "./WorkflowUserEditableBackgroundSoundZero.js"; +export * from "./WorkflowUserEditableCredentialsItem.js"; +export * from "./WorkflowUserEditableHooksItem.js"; +export * from "./WorkflowUserEditableModel.js"; +export * from "./WorkflowUserEditableNodesItem.js"; +export * from "./WorkflowUserEditableTranscriber.js"; +export * from "./WorkflowUserEditableVoice.js"; +export * from "./WorkflowUserEditableVoicemailDetection.js"; +export * from "./WorkflowUserEditableVoicemailDetectionZero.js"; +export * from "./WorkflowVoice.js"; +export * from "./WorkflowVoicemailDetection.js"; +export * from "./WorkflowVoicemailDetectionZero.js"; +export * from "./XAiCredential.js"; +export * from "./XAiCredentialProvider.js"; +export * from "./XaiModel.js"; +export * from "./XaiModelModel.js"; +export * from "./XaiModelProvider.js"; +export * from "./XaiModelToolsItem.js"; +export * from "./XssSecurityFilter.js"; +export * from "./XssSecurityFilterType.js"; diff --git a/src/core/auth/AuthProvider.ts b/src/core/auth/AuthProvider.ts index 07e0d6ab..86f670a8 100644 --- a/src/core/auth/AuthProvider.ts +++ b/src/core/auth/AuthProvider.ts @@ -1,4 +1,4 @@ -import { AuthRequest } from "./AuthRequest.js"; +import type { AuthRequest } from "./AuthRequest.js"; export interface AuthProvider { getAuthRequest(): Promise; diff --git a/src/core/auth/BasicAuth.ts b/src/core/auth/BasicAuth.ts index 1c0d8835..a6423591 100644 --- a/src/core/auth/BasicAuth.ts +++ b/src/core/auth/BasicAuth.ts @@ -18,7 +18,8 @@ export const BasicAuth = { fromAuthorizationHeader: (header: string): BasicAuth => { const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, ""); const decoded = base64Decode(credentials); - const [username, password] = decoded.split(":", 2); + const [username, ...passwordParts] = decoded.split(":"); + const password = passwordParts.length > 0 ? passwordParts.join(":") : undefined; if (username == null || password == null) { throw new Error("Invalid basic auth"); diff --git a/src/core/auth/index.ts b/src/core/auth/index.ts index 7faab9d3..23d31b07 100644 --- a/src/core/auth/index.ts +++ b/src/core/auth/index.ts @@ -1,4 +1,4 @@ -export { AuthProvider } from "./AuthProvider.js"; -export { type AuthRequest } from "./AuthRequest.js"; +export type { AuthProvider } from "./AuthProvider.js"; +export type { AuthRequest } from "./AuthRequest.js"; export { BasicAuth } from "./BasicAuth.js"; export { BearerToken } from "./BearerToken.js"; diff --git a/src/core/exports.ts b/src/core/exports.ts index e415a8f6..358d1fb9 100644 --- a/src/core/exports.ts +++ b/src/core/exports.ts @@ -1 +1,2 @@ export * from "./file/exports.js"; +export * from "./logging/exports.js"; diff --git a/src/core/fetcher/APIResponse.ts b/src/core/fetcher/APIResponse.ts index dd4b9466..97ab83c2 100644 --- a/src/core/fetcher/APIResponse.ts +++ b/src/core/fetcher/APIResponse.ts @@ -1,4 +1,4 @@ -import { RawResponse } from "./RawResponse.js"; +import type { RawResponse } from "./RawResponse.js"; /** * The response of an API call. diff --git a/src/core/fetcher/BinaryResponse.ts b/src/core/fetcher/BinaryResponse.ts index 614cb59b..4b4d0e89 100644 --- a/src/core/fetcher/BinaryResponse.ts +++ b/src/core/fetcher/BinaryResponse.ts @@ -1,4 +1,4 @@ -import { ResponseWithBody } from "./ResponseWithBody.js"; +import type { ResponseWithBody } from "./ResponseWithBody.js"; export type BinaryResponse = { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */ diff --git a/src/core/fetcher/EndpointMetadata.ts b/src/core/fetcher/EndpointMetadata.ts new file mode 100644 index 00000000..998d68f5 --- /dev/null +++ b/src/core/fetcher/EndpointMetadata.ts @@ -0,0 +1,13 @@ +export type SecuritySchemeKey = string; +/** + * A collection of security schemes, where the key is the name of the security scheme and the value is the list of scopes required for that scheme. + * All schemes in the collection must be satisfied for authentication to be successful. + */ +export type SecuritySchemeCollection = Record; +export type AuthScope = string; +export type EndpointMetadata = { + /** + * An array of security scheme collections. Each collection represents an alternative way to authenticate. + */ + security?: SecuritySchemeCollection[]; +}; diff --git a/src/core/fetcher/EndpointSupplier.ts b/src/core/fetcher/EndpointSupplier.ts new file mode 100644 index 00000000..8079841c --- /dev/null +++ b/src/core/fetcher/EndpointSupplier.ts @@ -0,0 +1,14 @@ +import type { EndpointMetadata } from "./EndpointMetadata.js"; +import type { Supplier } from "./Supplier.js"; + +type EndpointSupplierFn = (arg: { endpointMetadata: EndpointMetadata }) => T | Promise; +export type EndpointSupplier = Supplier | EndpointSupplierFn; +export const EndpointSupplier = { + get: async (supplier: EndpointSupplier, arg: { endpointMetadata: EndpointMetadata }): Promise => { + if (typeof supplier === "function") { + return (supplier as EndpointSupplierFn)(arg); + } else { + return supplier; + } + }, +}; diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index 39e69143..fedbcd88 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -1,14 +1,17 @@ import { toJson } from "../json.js"; -import { APIResponse } from "./APIResponse.js"; +import { createLogger, type LogConfig, type Logger } from "../logging/logger.js"; +import type { APIResponse } from "./APIResponse.js"; import { createRequestUrl } from "./createRequestUrl.js"; +import type { EndpointMetadata } from "./EndpointMetadata.js"; +import { EndpointSupplier } from "./EndpointSupplier.js"; import { getErrorResponseBody } from "./getErrorResponseBody.js"; import { getFetchFn } from "./getFetchFn.js"; import { getRequestBody } from "./getRequestBody.js"; import { getResponseBody } from "./getResponseBody.js"; +import { Headers } from "./Headers.js"; import { makeRequest } from "./makeRequest.js"; import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js"; import { requestWithRetries } from "./requestWithRetries.js"; -import { Supplier } from "./Supplier.js"; export type FetchFunction = (args: Fetcher.Args) => Promise>; @@ -17,16 +20,19 @@ export declare namespace Fetcher { url: string; method: string; contentType?: string; - headers?: Record | null | undefined>; + headers?: Record | null | undefined>; queryParameters?: Record; body?: unknown; timeoutMs?: number; maxRetries?: number; withCredentials?: boolean; abortSignal?: AbortSignal; - requestType?: "json" | "file" | "bytes"; + requestType?: "json" | "file" | "bytes" | "form" | "other"; responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer" | "binary-response"; duplex?: "half"; + endpointMetadata?: EndpointMetadata; + fetchFn?: typeof fetch; + logging?: LogConfig | Logger; } export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; @@ -53,10 +59,164 @@ export declare namespace Fetcher { } } -async function getHeaders(args: Fetcher.Args): Promise> { - const newHeaders: Record = {}; +const SENSITIVE_HEADERS = new Set([ + "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", +]); + +function redactHeaders(headers: Headers | Record): Record { + const filtered: Record = {}; + for (const [key, value] of headers instanceof Headers ? headers.entries() : Object.entries(headers)) { + if (SENSITIVE_HEADERS.has(key.toLowerCase())) { + filtered[key] = "[REDACTED]"; + } else { + filtered[key] = value; + } + } + return filtered; +} + +const SENSITIVE_QUERY_PARAMS = new Set([ + "api_key", + "api-key", + "apikey", + "token", + "access_token", + "access-token", + "auth_token", + "auth-token", + "password", + "passwd", + "secret", + "api_secret", + "api-secret", + "apisecret", + "key", + "session", + "session_id", + "session-id", +]); + +function redactQueryParameters(queryParameters?: Record): Record | undefined { + if (queryParameters == null) { + return queryParameters; + } + const redacted: Record = {}; + for (const [key, value] of Object.entries(queryParameters)) { + if (SENSITIVE_QUERY_PARAMS.has(key.toLowerCase())) { + redacted[key] = "[REDACTED]"; + } else { + redacted[key] = value; + } + } + return redacted; +} + +function redactUrl(url: string): string { + const protocolIndex = url.indexOf("://"); + if (protocolIndex === -1) return url; + + const afterProtocol = protocolIndex + 3; + + // Find the first delimiter that marks the end of the authority section + const pathStart = url.indexOf("/", afterProtocol); + let queryStart = url.indexOf("?", afterProtocol); + let fragmentStart = url.indexOf("#", afterProtocol); + + const firstDelimiter = Math.min( + pathStart === -1 ? url.length : pathStart, + queryStart === -1 ? url.length : queryStart, + fragmentStart === -1 ? url.length : fragmentStart, + ); + + // Find the LAST @ before the delimiter (handles multiple @ in credentials) + let atIndex = -1; + for (let i = afterProtocol; i < firstDelimiter; i++) { + if (url[i] === "@") { + atIndex = i; + } + } + + if (atIndex !== -1) { + url = `${url.slice(0, afterProtocol)}[REDACTED]@${url.slice(atIndex + 1)}`; + } + + // Recalculate queryStart since url might have changed + queryStart = url.indexOf("?"); + if (queryStart === -1) return url; + + fragmentStart = url.indexOf("#", queryStart); + const queryEnd = fragmentStart !== -1 ? fragmentStart : url.length; + const queryString = url.slice(queryStart + 1, queryEnd); + + if (queryString.length === 0) return url; + + // FAST PATH: Quick check if any sensitive keywords present + // Using indexOf is faster than regex for simple substring matching + const lower = queryString.toLowerCase(); + const hasSensitive = + lower.includes("token") || + lower.includes("key") || + lower.includes("password") || + lower.includes("passwd") || + lower.includes("secret") || + lower.includes("session") || + lower.includes("auth"); + + if (!hasSensitive) { + return url; + } + + // SLOW PATH: Parse and redact + const redactedParams: string[] = []; + const params = queryString.split("&"); + + for (const param of params) { + const equalIndex = param.indexOf("="); + if (equalIndex === -1) { + redactedParams.push(param); + continue; + } + + const key = param.slice(0, equalIndex); + let shouldRedact = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase()); + + if (!shouldRedact && key.includes("%")) { + try { + const decodedKey = decodeURIComponent(key); + shouldRedact = SENSITIVE_QUERY_PARAMS.has(decodedKey.toLowerCase()); + } catch {} + } + + redactedParams.push(shouldRedact ? `${key}=[REDACTED]` : param); + } + + return url.slice(0, queryStart + 1) + redactedParams.join("&") + url.slice(queryEnd); +} + +async function getHeaders(args: Fetcher.Args): Promise { + const newHeaders: Headers = new Headers(); + + newHeaders.set( + "Accept", + args.responseType === "json" ? "application/json" : args.responseType === "text" ? "text/plain" : "*/*", + ); if (args.body !== undefined && args.contentType != null) { - newHeaders["Content-Type"] = args.contentType; + newHeaders.set("Content-Type", args.contentType); } if (args.headers == null) { @@ -64,15 +224,15 @@ async function getHeaders(args: Fetcher.Args): Promise> { } for (const [key, value] of Object.entries(args.headers)) { - const result = await Supplier.get(value); + const result = await EndpointSupplier.get(value, { endpointMetadata: args.endpointMetadata ?? {} }); if (typeof result === "string") { - newHeaders[key] = result; + newHeaders.set(key, result); continue; } if (result == null) { continue; } - newHeaders[key] = `${result}`; + newHeaders.set(key, `${result}`); } return newHeaders; } @@ -81,9 +241,22 @@ export async function fetcherImpl(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise= 200 && response.status < 400) { + if (logger.isDebug()) { + const metadata = { + method: args.method, + url: redactUrl(url), + statusCode: response.status, + responseHeaders: redactHeaders(response.headers), + }; + logger.debug("HTTP request succeeded", metadata); + } return { ok: true, body: (await getResponseBody(response, args.responseType)) as R, @@ -110,6 +292,15 @@ export async function fetcherImpl(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise case "application/ld+json": case "application/problem+json": case "application/vnd.api+json": - case "text/json": + case "text/json": { const text = await response.text(); return text.length > 0 ? fromJson(text) : undefined; + } default: if (contentType.startsWith("application/vnd.") && contentType.endsWith("+json")) { const text = await response.text(); diff --git a/src/core/fetcher/getRequestBody.ts b/src/core/fetcher/getRequestBody.ts index e38457c5..91d9d81f 100644 --- a/src/core/fetcher/getRequestBody.ts +++ b/src/core/fetcher/getRequestBody.ts @@ -1,13 +1,17 @@ import { toJson } from "../json.js"; +import { toQueryString } from "../url/qs.js"; export declare namespace GetRequestBody { interface Args { body: unknown; - type: "json" | "file" | "bytes" | "other"; + type: "json" | "file" | "bytes" | "form" | "other"; } } export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise { + if (type === "form") { + return toQueryString(body, { arrayFormat: "repeat", encode: true }); + } if (type.includes("json")) { return toJson(body); } else { diff --git a/src/core/fetcher/getResponseBody.ts b/src/core/fetcher/getResponseBody.ts index 7ca8b3d2..0f24de17 100644 --- a/src/core/fetcher/getResponseBody.ts +++ b/src/core/fetcher/getResponseBody.ts @@ -1,6 +1,6 @@ +import { fromJson } from "../json.js"; import { getBinaryResponse } from "./BinaryResponse.js"; import { isResponseWithBody } from "./ResponseWithBody.js"; -import { fromJson } from "../json.js"; export async function getResponseBody(response: Response, responseType?: string): Promise { if (!isResponseWithBody(response)) { @@ -26,9 +26,9 @@ export async function getResponseBody(response: Response, responseType?: string) const text = await response.text(); if (text.length > 0) { try { - let responseBody = fromJson(text); + const responseBody = fromJson(text); return responseBody; - } catch (err) { + } catch (_err) { return { ok: false, error: { diff --git a/src/core/fetcher/index.ts b/src/core/fetcher/index.ts index a131e346..c3bc6da2 100644 --- a/src/core/fetcher/index.ts +++ b/src/core/fetcher/index.ts @@ -1,5 +1,7 @@ export type { APIResponse } from "./APIResponse.js"; export type { BinaryResponse } from "./BinaryResponse.js"; +export type { EndpointMetadata } from "./EndpointMetadata.js"; +export { EndpointSupplier } from "./EndpointSupplier.js"; export type { Fetcher, FetchFunction } from "./Fetcher.js"; export { fetcher } from "./Fetcher.js"; export { getHeader } from "./getHeader.js"; diff --git a/src/core/fetcher/makeRequest.ts b/src/core/fetcher/makeRequest.ts index 1a5ffd3c..c8d3f2ed 100644 --- a/src/core/fetcher/makeRequest.ts +++ b/src/core/fetcher/makeRequest.ts @@ -4,7 +4,7 @@ export const makeRequest = async ( fetchFn: (url: string, init: RequestInit) => Promise, url: string, method: string, - headers: Record, + headers: Headers | Record, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, @@ -13,19 +13,17 @@ export const makeRequest = async ( ): Promise => { const signals: AbortSignal[] = []; - // Add timeout signal - let timeoutAbortId: NodeJS.Timeout | undefined = undefined; + let timeoutAbortId: NodeJS.Timeout | undefined; if (timeoutMs != null) { const { signal, abortId } = getTimeoutSignal(timeoutMs); timeoutAbortId = abortId; signals.push(signal); } - // Add arbitrary signal if (abortSignal != null) { signals.push(abortSignal); } - let newSignals = anySignal(signals); + const newSignals = anySignal(signals); const response = await fetchFn(url, { method: method, headers, diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts index 560432ef..1f689688 100644 --- a/src/core/fetcher/requestWithRetries.ts +++ b/src/core/fetcher/requestWithRetries.ts @@ -4,30 +4,25 @@ const DEFAULT_MAX_RETRIES = 2; const JITTER_FACTOR = 0.2; // 20% random jitter function addPositiveJitter(delay: number): number { - // Generate a random value between 0 and +JITTER_FACTOR const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR; return delay * jitterMultiplier; } function addSymmetricJitter(delay: number): number { - // Generate a random value in a JITTER_FACTOR-sized percentage range around delay const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR; return delay * jitterMultiplier; } function getRetryDelayFromHeaders(response: Response, retryAttempt: number): number { - // Check for Retry-After header first (RFC 7231), with no jitter const retryAfter = response.headers.get("Retry-After"); if (retryAfter) { - // Parse as number of seconds... const retryAfterSeconds = parseInt(retryAfter, 10); - if (!isNaN(retryAfterSeconds) && retryAfterSeconds > 0) { + if (!Number.isNaN(retryAfterSeconds) && retryAfterSeconds > 0) { return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY); } - // ...or as an HTTP date; both are valid const retryAfterDate = new Date(retryAfter); - if (!isNaN(retryAfterDate.getTime())) { + if (!Number.isNaN(retryAfterDate.getTime())) { const delay = retryAfterDate.getTime() - Date.now(); if (delay > 0) { return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY); @@ -35,12 +30,10 @@ function getRetryDelayFromHeaders(response: Response, retryAttempt: number): num } } - // Then check for industry-standard X-RateLimit-Reset header, with positive jitter const rateLimitReset = response.headers.get("X-RateLimit-Reset"); if (rateLimitReset) { const resetTime = parseInt(rateLimitReset, 10); - if (!isNaN(resetTime)) { - // Assume Unix timestamp in epoch seconds + if (!Number.isNaN(resetTime)) { const delay = resetTime * 1000 - Date.now(); if (delay > 0) { return addPositiveJitter(Math.min(delay, MAX_RETRY_DELAY)); @@ -48,8 +41,7 @@ function getRetryDelayFromHeaders(response: Response, retryAttempt: number): num } } - // Fall back to exponential backoff, with symmetric jitter - return addSymmetricJitter(Math.min(INITIAL_RETRY_DELAY * Math.pow(2, retryAttempt), MAX_RETRY_DELAY)); + return addSymmetricJitter(Math.min(INITIAL_RETRY_DELAY * 2 ** retryAttempt, MAX_RETRY_DELAY)); } export async function requestWithRetries( @@ -60,7 +52,6 @@ export async function requestWithRetries( for (let i = 0; i < maxRetries; ++i) { if ([408, 429].includes(response.status) || response.status >= 500) { - // Get delay with appropriate jitter applied const delay = getRetryDelayFromHeaders(response, i); await new Promise((resolve) => setTimeout(resolve, delay)); diff --git a/src/core/fetcher/signals.ts b/src/core/fetcher/signals.ts index a8d32a2e..c9fcaeff 100644 --- a/src/core/fetcher/signals.ts +++ b/src/core/fetcher/signals.ts @@ -6,29 +6,17 @@ export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abor return { signal: controller.signal, abortId }; } -/** - * Returns an abort signal that is getting aborted when - * at least one of the specified abort signals is aborted. - * - * Requires at least node.js 18. - */ export function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal { - // Allowing signals to be passed either as array - // of signals or as multiple arguments. const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args) as AbortSignal[]; const controller = new AbortController(); for (const signal of signals) { if (signal.aborted) { - // Exiting early if one of the signals - // is already aborted. controller.abort((signal as any)?.reason); break; } - // Listening for signals and removing the listeners - // when at least one symbol is aborted. signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), { signal: controller.signal, }); diff --git a/src/core/file/exports.ts b/src/core/file/exports.ts index acda0367..3b0b3967 100644 --- a/src/core/file/exports.ts +++ b/src/core/file/exports.ts @@ -1 +1 @@ -export { Uploadable } from "./types.js"; +export type { Uploadable } from "./types.js"; diff --git a/src/core/file/file.ts b/src/core/file/file.ts index bc4b7e50..0bacc484 100644 --- a/src/core/file/file.ts +++ b/src/core/file/file.ts @@ -1,4 +1,4 @@ -import { Uploadable } from "./types.js"; +import type { Uploadable } from "./types.js"; export async function toBinaryUploadRequest( file: Uploadable, @@ -20,19 +20,40 @@ export async function toBinaryUploadRequest( return request; } -async function getFileWithMetadata(file: Uploadable): Promise { +export async function toMultipartDataPart( + file: Uploadable, +): Promise<{ data: Uploadable.FileLike; filename?: string; contentType?: string }> { + const { data, filename, contentType } = await getFileWithMetadata(file, { + noSniffFileSize: true, + }); + return { + data, + filename, + contentType, + }; +} + +async function getFileWithMetadata( + file: Uploadable, + { noSniffFileSize }: { noSniffFileSize?: boolean } = {}, +): Promise { if (isFileLike(file)) { - return getFileWithMetadata({ - data: file, - }); + return getFileWithMetadata( + { + data: file, + }, + { noSniffFileSize }, + ); } + if ("path" in file) { const fs = await import("fs"); if (!fs || !fs.createReadStream) { throw new Error("File path uploads are not supported in this environment."); } const data = fs.createReadStream(file.path); - const contentLength = file.contentLength ?? (await tryGetFileSizeFromPath(file.path)); + const contentLength = + file.contentLength ?? (noSniffFileSize === true ? undefined : await tryGetFileSizeFromPath(file.path)); const filename = file.filename ?? getNameFromPath(file.path); return { data, @@ -43,7 +64,11 @@ async function getFileWithMetadata(file: Uploadable): Promise } const fileStat = await fs.promises.stat(path); return fileStat.size; - } catch (fallbackError) { + } catch (_fallbackError) { return undefined; } } @@ -92,7 +117,10 @@ function tryGetNameFromFileLike(data: Uploadable.FileLike): string | undefined { return undefined; } -async function tryGetContentLengthFromFileLike(data: Uploadable.FileLike): Promise { +async function tryGetContentLengthFromFileLike( + data: Uploadable.FileLike, + { noSniffFileSize }: { noSniffFileSize?: boolean } = {}, +): Promise { if (isBuffer(data)) { return data.length; } @@ -108,6 +136,9 @@ async function tryGetContentLengthFromFileLike(data: Uploadable.FileLike): Promi if (isFile(data)) { return data.size; } + if (noSniffFileSize === true) { + return undefined; + } if (isPathedValue(data)) { return await tryGetFileSizeFromPath(data.path.toString()); } diff --git a/src/core/form-data-utils/FormDataWrapper.ts b/src/core/form-data-utils/FormDataWrapper.ts index fa1ca9b9..bea0cf82 100644 --- a/src/core/form-data-utils/FormDataWrapper.ts +++ b/src/core/form-data-utils/FormDataWrapper.ts @@ -1,27 +1,52 @@ +import { toMultipartDataPart, type Uploadable } from "../../core/file/index.js"; import { toJson } from "../../core/json.js"; import { RUNTIME } from "../runtime/index.js"; -type NamedValue = { - name: string; -} & unknown; +interface FormDataRequest { + body: Body; + headers: Record; + duplex?: "half"; +} -type PathedValue = { - path: string | { toString(): string }; -} & unknown; +export async function newFormData(): Promise { + return new FormDataWrapper(); +} + +export class FormDataWrapper { + private fd: FormData = new FormData(); + + public async setup(): Promise { + // noop + } + + public append(key: string, value: unknown): void { + this.fd.append(key, String(value)); + } + + public async appendFile(key: string, value: Uploadable): Promise { + const { data, filename, contentType } = await toMultipartDataPart(value); + const blob = await convertToBlob(data, contentType); + if (filename) { + this.fd.append(key, blob, filename); + } else { + this.fd.append(key, blob); + } + } + + public getRequest(): FormDataRequest { + return { + body: this.fd, + headers: {}, + duplex: "half" as const, + }; + } +} type StreamLike = { read?: () => unknown; pipe?: (dest: unknown) => unknown; } & unknown; -function isNamedValue(value: unknown): value is NamedValue { - return typeof value === "object" && value != null && "name" in value; -} - -function isPathedValue(value: unknown): value is PathedValue { - return typeof value === "object" && value != null && "path" in value; -} - function isStreamLike(value: unknown): value is StreamLike { return typeof value === "object" && value != null && ("read" in value || "pipe" in value); } @@ -38,19 +63,6 @@ function isArrayBufferView(value: unknown): value is ArrayBufferView { return ArrayBuffer.isView(value); } -interface FormDataRequest { - body: Body; - headers: Record; - duplex?: "half"; -} - -function getLastPathSegment(pathStr: string): string { - const lastForwardSlash = pathStr.lastIndexOf("/"); - const lastBackSlash = pathStr.lastIndexOf("\\"); - const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash); - return lastSlashIndex >= 0 ? pathStr.substring(lastSlashIndex + 1) : pathStr; -} - async function streamToBuffer(stream: unknown): Promise { if (RUNTIME.type === "node") { const { Readable } = await import("stream"); @@ -90,87 +102,39 @@ async function streamToBuffer(stream: unknown): Promise { } throw new Error( - "Unsupported stream type: " + typeof stream + ". Expected Node.js Readable stream or Web ReadableStream.", + `Unsupported stream type: ${typeof stream}. Expected Node.js Readable stream or Web ReadableStream.`, ); } -export async function newFormData(): Promise { - return new FormDataWrapper(); -} - -export class FormDataWrapper { - private fd: FormData = new FormData(); - - public async setup(): Promise { - // noop +async function convertToBlob(value: unknown, contentType?: string): Promise { + if (isStreamLike(value) || isReadableStream(value)) { + const buffer = await streamToBuffer(value); + return new Blob([buffer], { type: contentType }); } - public append(key: string, value: unknown): void { - this.fd.append(key, String(value)); + if (value instanceof Blob) { + return value; } - private getFileName(value: unknown, filename?: string): string | undefined { - if (filename != null) { - return filename; - } - if (isNamedValue(value)) { - return value.name; - } - if (isPathedValue(value) && value.path) { - return getLastPathSegment(value.path.toString()); - } - return undefined; + if (isBuffer(value)) { + return new Blob([value], { type: contentType }); } - private async convertToBlob(value: unknown): Promise { - if (isStreamLike(value) || isReadableStream(value)) { - const buffer = await streamToBuffer(value); - return new Blob([buffer]); - } - - if (value instanceof Blob) { - return value; - } - - if (isBuffer(value)) { - return new Blob([value]); - } - - if (value instanceof ArrayBuffer) { - return new Blob([value]); - } - - if (isArrayBufferView(value)) { - return new Blob([value]); - } - - if (typeof value === "string") { - return new Blob([value]); - } - - if (typeof value === "object" && value !== null) { - return new Blob([toJson(value)], { type: "application/json" }); - } - - return new Blob([String(value)]); + if (value instanceof ArrayBuffer) { + return new Blob([value], { type: contentType }); } - public async appendFile(key: string, value: unknown, fileName?: string): Promise { - fileName = this.getFileName(value, fileName); - const blob = await this.convertToBlob(value); + if (isArrayBufferView(value)) { + return new Blob([value], { type: contentType }); + } - if (fileName) { - this.fd.append(key, blob, fileName); - } else { - this.fd.append(key, blob); - } + if (typeof value === "string") { + return new Blob([value], { type: contentType }); } - public getRequest(): FormDataRequest { - return { - body: this.fd, - headers: {}, - duplex: "half" as const, - }; + if (typeof value === "object" && value !== null) { + return new Blob([toJson(value)], { type: contentType ?? "application/json" }); } + + return new Blob([String(value)], { type: contentType }); } diff --git a/src/core/headers.ts b/src/core/headers.ts index 85836147..78ed8b50 100644 --- a/src/core/headers.ts +++ b/src/core/headers.ts @@ -1,41 +1,33 @@ -import * as core from "./index.js"; - -export function mergeHeaders( - ...headersArray: ( - | Record | null | undefined> - | null - | undefined - )[] -): Record> { - const result: Record> = {}; +export function mergeHeaders( + ...headersArray: (Record | null | undefined)[] +): Record { + const result: Record = {}; for (const [key, value] of headersArray .filter((headers) => headers != null) .flatMap((headers) => Object.entries(headers))) { + const insensitiveKey = key.toLowerCase(); if (value != null) { - result[key] = value; - } else if (key in result) { - delete result[key]; + result[insensitiveKey] = value; + } else if (insensitiveKey in result) { + delete result[insensitiveKey]; } } return result; } -export function mergeOnlyDefinedHeaders( - ...headersArray: ( - | Record | null | undefined> - | null - | undefined - )[] -): Record> { - const result: Record> = {}; +export function mergeOnlyDefinedHeaders( + ...headersArray: (Record | null | undefined)[] +): Record { + const result: Record = {}; for (const [key, value] of headersArray .filter((headers) => headers != null) .flatMap((headers) => Object.entries(headers))) { + const insensitiveKey = key.toLowerCase(); if (value != null) { - result[key] = value; + result[insensitiveKey] = value; } } diff --git a/src/core/index.ts b/src/core/index.ts index 60b25666..4e377ed4 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,7 +1,8 @@ -export * from "./fetcher/index.js"; -export * from "./runtime/index.js"; -export * as url from "./url/index.js"; export * from "./auth/index.js"; export * from "./base64.js"; -export * from "./form-data-utils/index.js"; +export * from "./fetcher/index.js"; export * as file from "./file/index.js"; +export * from "./form-data-utils/index.js"; +export * as logging from "./logging/index.js"; +export * from "./runtime/index.js"; +export * as url from "./url/index.js"; diff --git a/src/core/logging/exports.ts b/src/core/logging/exports.ts new file mode 100644 index 00000000..88f6c00d --- /dev/null +++ b/src/core/logging/exports.ts @@ -0,0 +1,19 @@ +import * as logger from "./logger.js"; + +export namespace logging { + /** + * Configuration for logger instances. + */ + export type LogConfig = logger.LogConfig; + export type LogLevel = logger.LogLevel; + export const LogLevel: typeof logger.LogLevel = logger.LogLevel; + export type ILogger = logger.ILogger; + /** + * Console logger implementation that outputs to the console. + */ + export type ConsoleLogger = logger.ConsoleLogger; + /** + * Console logger implementation that outputs to the console. + */ + export const ConsoleLogger: typeof logger.ConsoleLogger = logger.ConsoleLogger; +} diff --git a/src/core/logging/index.ts b/src/core/logging/index.ts new file mode 100644 index 00000000..d81cc32c --- /dev/null +++ b/src/core/logging/index.ts @@ -0,0 +1 @@ +export * from "./logger.js"; diff --git a/src/core/logging/logger.ts b/src/core/logging/logger.ts new file mode 100644 index 00000000..a3f3673c --- /dev/null +++ b/src/core/logging/logger.ts @@ -0,0 +1,203 @@ +export const LogLevel = { + Debug: "debug", + Info: "info", + Warn: "warn", + Error: "error", +} as const; +export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel]; +const logLevelMap: Record = { + [LogLevel.Debug]: 1, + [LogLevel.Info]: 2, + [LogLevel.Warn]: 3, + [LogLevel.Error]: 4, +}; + +export interface ILogger { + /** + * Logs a debug message. + * @param message - The message to log + * @param args - Additional arguments to log + */ + debug(message: string, ...args: unknown[]): void; + /** + * Logs an info message. + * @param message - The message to log + * @param args - Additional arguments to log + */ + info(message: string, ...args: unknown[]): void; + /** + * Logs a warning message. + * @param message - The message to log + * @param args - Additional arguments to log + */ + warn(message: string, ...args: unknown[]): void; + /** + * Logs an error message. + * @param message - The message to log + * @param args - Additional arguments to log + */ + error(message: string, ...args: unknown[]): void; +} + +/** + * Configuration for logger initialization. + */ +export interface LogConfig { + /** + * Minimum log level to output. + * @default LogLevel.Info + */ + level?: LogLevel; + /** + * Logger implementation to use. + * @default new ConsoleLogger() + */ + logger?: ILogger; + /** + * Whether logging should be silenced. + * @default true + */ + silent?: boolean; +} + +/** + * Default console-based logger implementation. + */ +export class ConsoleLogger implements ILogger { + debug(message: string, ...args: unknown[]): void { + console.debug(message, ...args); + } + info(message: string, ...args: unknown[]): void { + console.info(message, ...args); + } + warn(message: string, ...args: unknown[]): void { + console.warn(message, ...args); + } + error(message: string, ...args: unknown[]): void { + console.error(message, ...args); + } +} + +/** + * Logger class that provides level-based logging functionality. + */ +export class Logger { + private readonly level: number; + private readonly logger: ILogger; + private readonly silent: boolean; + + /** + * Creates a new logger instance. + * @param config - Logger configuration + */ + constructor(config: Required) { + this.level = logLevelMap[config.level]; + this.logger = config.logger; + this.silent = config.silent; + } + + /** + * Checks if a log level should be output based on configuration. + * @param level - The log level to check + * @returns True if the level should be logged + */ + public shouldLog(level: LogLevel): boolean { + return !this.silent && this.level <= logLevelMap[level]; + } + + /** + * Checks if debug logging is enabled. + * @returns True if debug logs should be output + */ + public isDebug(): boolean { + return this.shouldLog(LogLevel.Debug); + } + + /** + * Logs a debug message if debug logging is enabled. + * @param message - The message to log + * @param args - Additional arguments to log + */ + public debug(message: string, ...args: unknown[]): void { + if (this.isDebug()) { + this.logger.debug(message, ...args); + } + } + + /** + * Checks if info logging is enabled. + * @returns True if info logs should be output + */ + public isInfo(): boolean { + return this.shouldLog(LogLevel.Info); + } + + /** + * Logs an info message if info logging is enabled. + * @param message - The message to log + * @param args - Additional arguments to log + */ + public info(message: string, ...args: unknown[]): void { + if (this.isInfo()) { + this.logger.info(message, ...args); + } + } + + /** + * Checks if warning logging is enabled. + * @returns True if warning logs should be output + */ + public isWarn(): boolean { + return this.shouldLog(LogLevel.Warn); + } + + /** + * Logs a warning message if warning logging is enabled. + * @param message - The message to log + * @param args - Additional arguments to log + */ + public warn(message: string, ...args: unknown[]): void { + if (this.isWarn()) { + this.logger.warn(message, ...args); + } + } + + /** + * Checks if error logging is enabled. + * @returns True if error logs should be output + */ + public isError(): boolean { + return this.shouldLog(LogLevel.Error); + } + + /** + * Logs an error message if error logging is enabled. + * @param message - The message to log + * @param args - Additional arguments to log + */ + public error(message: string, ...args: unknown[]): void { + if (this.isError()) { + this.logger.error(message, ...args); + } + } +} + +export function createLogger(config?: LogConfig | Logger): Logger { + if (config == null) { + return defaultLogger; + } + if (config instanceof Logger) { + return config; + } + config = config ?? {}; + config.level ??= LogLevel.Info; + config.logger ??= new ConsoleLogger(); + config.silent ??= true; + return new Logger(config as Required); +} + +const defaultLogger: Logger = new Logger({ + level: LogLevel.Info, + logger: new ConsoleLogger(), + silent: true, +}); diff --git a/src/core/url/encodePathParam.ts b/src/core/url/encodePathParam.ts new file mode 100644 index 00000000..19b90124 --- /dev/null +++ b/src/core/url/encodePathParam.ts @@ -0,0 +1,18 @@ +export function encodePathParam(param: unknown): string { + if (param === null) { + return "null"; + } + const typeofParam = typeof param; + switch (typeofParam) { + case "undefined": + return "undefined"; + case "string": + case "number": + case "boolean": + break; + default: + param = String(param); + break; + } + return encodeURIComponent(param as string | number | boolean); +} diff --git a/src/core/url/index.ts b/src/core/url/index.ts index ed5aa0ff..f2e0fa2d 100644 --- a/src/core/url/index.ts +++ b/src/core/url/index.ts @@ -1,2 +1,3 @@ +export { encodePathParam } from "./encodePathParam.js"; export { join } from "./join.js"; export { toQueryString } from "./qs.js"; diff --git a/src/core/url/join.ts b/src/core/url/join.ts index 200426be..7ca7daef 100644 --- a/src/core/url/join.ts +++ b/src/core/url/join.ts @@ -12,12 +12,11 @@ export function join(base: string, ...segments: string[]): string { try { url = new URL(base); } catch { - // Fallback to path joining if URL is malformed return joinPath(base, ...segments); } const lastSegment = segments[segments.length - 1]; - const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith("/"); + const shouldPreserveTrailingSlash = lastSegment?.endsWith("/"); for (const segment of segments) { const cleanSegment = trimSlashes(segment); @@ -44,7 +43,7 @@ function joinPath(base: string, ...segments: string[]): string { let result = base; const lastSegment = segments[segments.length - 1]; - const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith("/"); + const shouldPreserveTrailingSlash = lastSegment?.endsWith("/"); for (const segment of segments) { const cleanSegment = trimSlashes(segment); @@ -64,7 +63,7 @@ function joinPathSegments(left: string, right: string): string { if (left.endsWith("/")) { return left + right; } - return left + "/" + right; + return `${left}/${right}`; } function trimSlashes(str: string): string { diff --git a/src/environments.ts b/src/environments.ts index a5594332..1ff3240f 100644 --- a/src/environments.ts +++ b/src/environments.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export const VapiEnvironment = { Default: "https://api.vapi.ai", diff --git a/src/errors/VapiError.ts b/src/errors/VapiError.ts index efb31527..dd58f4d1 100644 --- a/src/errors/VapiError.ts +++ b/src/errors/VapiError.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import * as core from "../core/index.js"; +import type * as core from "../core/index.js"; import { toJson } from "../core/json.js"; export class VapiError extends Error { @@ -38,7 +36,7 @@ function buildMessage({ statusCode: number | undefined; body: unknown | undefined; }): string { - let lines: string[] = []; + const lines: string[] = []; if (message != null) { lines.push(message); } diff --git a/src/errors/VapiTimeoutError.ts b/src/errors/VapiTimeoutError.ts index 3c388a72..97d7ebc1 100644 --- a/src/errors/VapiTimeoutError.ts +++ b/src/errors/VapiTimeoutError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export class VapiTimeoutError extends Error { constructor(message: string) { diff --git a/src/index.ts b/src/index.ts index 5dcd8795..1912bebd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ export * as Vapi from "./api/index.js"; -export { VapiError, VapiTimeoutError } from "./errors/index.js"; +export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js"; export { VapiClient } from "./Client.js"; export { VapiEnvironment } from "./environments.js"; +export { VapiError, VapiTimeoutError } from "./errors/index.js"; export * from "./exports.js"; diff --git a/src/version.ts b/src/version.ts index b4ad2a35..cb3f87e9 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.10.4"; +export const SDK_VERSION = "0.10.3"; diff --git a/tests/BrowserTestEnvironment.ts b/tests/BrowserTestEnvironment.ts deleted file mode 100644 index 0f32bf7b..00000000 --- a/tests/BrowserTestEnvironment.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { TestEnvironment } from "jest-environment-jsdom"; - -class BrowserTestEnvironment extends TestEnvironment { - async setup() { - await super.setup(); - this.global.Request = Request; - this.global.Response = Response; - this.global.ReadableStream = ReadableStream; - this.global.TextEncoder = TextEncoder; - this.global.TextDecoder = TextDecoder; - this.global.FormData = FormData; - this.global.File = File; - this.global.Blob = Blob; - } -} - -export default BrowserTestEnvironment; diff --git a/tests/mock-server/MockServer.ts b/tests/mock-server/MockServer.ts index 6e258f17..95487215 100644 --- a/tests/mock-server/MockServer.ts +++ b/tests/mock-server/MockServer.ts @@ -1,4 +1,4 @@ -import { RequestHandlerOptions } from "msw"; +import type { RequestHandlerOptions } from "msw"; import type { SetupServer } from "msw/node"; import { mockEndpointBuilder } from "./mockEndpointBuilder"; @@ -19,7 +19,7 @@ export class MockServer { public mockEndpoint(options?: RequestHandlerOptions): ReturnType { const builder = mockEndpointBuilder({ - once: options?.once, + once: options?.once ?? true, onBuild: (handler) => { this.server.use(handler); }, diff --git a/tests/mock-server/MockServerPool.ts b/tests/mock-server/MockServerPool.ts index 81608069..e1a90f7f 100644 --- a/tests/mock-server/MockServerPool.ts +++ b/tests/mock-server/MockServerPool.ts @@ -22,7 +22,7 @@ async function formatHttpRequest(request: Request, id?: string): Promise } else if (clone.body) { body = await clone.text(); } - } catch (e) { + } catch (_e) { body = "(unable to parse body)"; } @@ -48,7 +48,7 @@ async function formatHttpResponse(response: Response, id?: string): Promise { const formattedRequest = await formatHttpRequest(request, requestId); - console.debug("request:start\n" + formattedRequest); + console.debug(`request:start\n${formattedRequest}`); }); mswServer.events.on("request:unhandled", async ({ request, requestId }) => { const formattedRequest = await formatHttpRequest(request, requestId); - console.debug("request:unhandled\n" + formattedRequest); + console.debug(`request:unhandled\n${formattedRequest}`); }); mswServer.events.on("response:mocked", async ({ request, response, requestId }) => { const formattedResponse = await formatHttpResponse(response, requestId); - console.debug("response:mocked\n" + formattedResponse); + console.debug(`response:mocked\n${formattedResponse}`); }); } } diff --git a/tests/mock-server/mockEndpointBuilder.ts b/tests/mock-server/mockEndpointBuilder.ts index 88368d4d..1b0e5107 100644 --- a/tests/mock-server/mockEndpointBuilder.ts +++ b/tests/mock-server/mockEndpointBuilder.ts @@ -1,7 +1,8 @@ -import { DefaultBodyType, HttpHandler, HttpResponse, HttpResponseResolver, http } from "msw"; +import { type DefaultBodyType, type HttpHandler, HttpResponse, type HttpResponseResolver, http } from "msw"; import { url } from "../../src/core"; import { toJson } from "../../src/core/json"; +import { withFormUrlEncoded } from "./withFormUrlEncoded"; import { withHeaders } from "./withHeaders"; import { withJson } from "./withJson"; @@ -26,6 +27,7 @@ interface RequestHeadersStage extends RequestBodyStage, ResponseStage { interface RequestBodyStage extends ResponseStage { jsonBody(body: unknown): ResponseStage; + formUrlEncodedBody(body: unknown): ResponseStage; } interface ResponseStage { @@ -135,6 +137,16 @@ class RequestBuilder implements MethodStage, RequestHeadersStage, RequestBodySta return this; } + formUrlEncodedBody(body: unknown): ResponseStage { + if (body === undefined) { + throw new Error( + "Undefined is not valid for form-urlencoded. Do not call formUrlEncodedBody if you want an empty body.", + ); + } + this.predicates.push((resolver) => withFormUrlEncoded(body, resolver)); + return this; + } + respondWith(): ResponseStatusStage { return new ResponseBuilder(this.method, this.buildUrl(), this.predicates, this.handlerOptions); } diff --git a/tests/mock-server/setup.ts b/tests/mock-server/setup.ts index c216d607..aeb3a95a 100644 --- a/tests/mock-server/setup.ts +++ b/tests/mock-server/setup.ts @@ -1,4 +1,4 @@ -import { afterAll, beforeAll } from "@jest/globals"; +import { afterAll, beforeAll } from "vitest"; import { mockServerPool } from "./MockServerPool"; diff --git a/tests/mock-server/withFormUrlEncoded.ts b/tests/mock-server/withFormUrlEncoded.ts new file mode 100644 index 00000000..e9e6ff2d --- /dev/null +++ b/tests/mock-server/withFormUrlEncoded.ts @@ -0,0 +1,80 @@ +import { type HttpResponseResolver, passthrough } from "msw"; + +import { toJson } from "../../src/core/json"; + +/** + * Creates a request matcher that validates if the request form-urlencoded body exactly matches the expected object + * @param expectedBody - The exact body object to match against + * @param resolver - Response resolver to execute if body matches + */ +export function withFormUrlEncoded(expectedBody: unknown, resolver: HttpResponseResolver): HttpResponseResolver { + return async (args) => { + const { request } = args; + + let clonedRequest: Request; + let bodyText: string | undefined; + let actualBody: Record; + try { + clonedRequest = request.clone(); + bodyText = await clonedRequest.text(); + if (bodyText === "") { + console.error("Request body is empty, expected a form-urlencoded body."); + return passthrough(); + } + const params = new URLSearchParams(bodyText); + actualBody = {}; + for (const [key, value] of params.entries()) { + actualBody[key] = value; + } + } catch (error) { + console.error(`Error processing form-urlencoded request body:\n\tError: ${error}\n\tBody: ${bodyText}`); + return passthrough(); + } + + const mismatches = findMismatches(actualBody, expectedBody); + if (Object.keys(mismatches).length > 0) { + console.error("Form-urlencoded body mismatch:", toJson(mismatches, undefined, 2)); + return passthrough(); + } + + return resolver(args); + }; +} + +function findMismatches(actual: any, expected: any): Record { + const mismatches: Record = {}; + + if (typeof actual !== typeof expected) { + return { value: { actual, expected } }; + } + + if (typeof actual !== "object" || actual === null || expected === null) { + if (actual !== expected) { + return { value: { actual, expected } }; + } + return {}; + } + + const actualKeys = Object.keys(actual); + const expectedKeys = Object.keys(expected); + + const allKeys = new Set([...actualKeys, ...expectedKeys]); + + for (const key of allKeys) { + if (!expectedKeys.includes(key)) { + if (actual[key] === undefined) { + continue; + } + mismatches[key] = { actual: actual[key], expected: undefined }; + } else if (!actualKeys.includes(key)) { + if (expected[key] === undefined) { + continue; + } + mismatches[key] = { actual: undefined, expected: expected[key] }; + } else if (actual[key] !== expected[key]) { + mismatches[key] = { actual: actual[key], expected: expected[key] }; + } + } + + return mismatches; +} diff --git a/tests/mock-server/withHeaders.ts b/tests/mock-server/withHeaders.ts index e77c837d..6599d2b4 100644 --- a/tests/mock-server/withHeaders.ts +++ b/tests/mock-server/withHeaders.ts @@ -1,4 +1,4 @@ -import { HttpResponseResolver, passthrough } from "msw"; +import { type HttpResponseResolver, passthrough } from "msw"; /** * Creates a request matcher that validates if request headers match specified criteria diff --git a/tests/mock-server/withJson.ts b/tests/mock-server/withJson.ts index 03f585de..b627638b 100644 --- a/tests/mock-server/withJson.ts +++ b/tests/mock-server/withJson.ts @@ -1,4 +1,4 @@ -import { HttpResponseResolver, passthrough } from "msw"; +import { type HttpResponseResolver, passthrough } from "msw"; import { fromJson, toJson } from "../../src/core/json"; @@ -67,7 +67,7 @@ function findMismatches(actual: any, expected: any): Record 0) { for (const [mismatchKey, mismatchValue] of Object.entries(itemMismatches)) { - arrayMismatches[`[${i}]${mismatchKey === "value" ? "" : "." + mismatchKey}`] = mismatchValue; + arrayMismatches[`[${i}]${mismatchKey === "value" ? "" : `.${mismatchKey}`}`] = mismatchValue; } } } @@ -99,7 +99,7 @@ function findMismatches(actual: any, expected: any): Record 0) { for (const [nestedKey, nestedValue] of Object.entries(nestedMismatches)) { - mismatches[`${key}${nestedKey === "value" ? "" : "." + nestedKey}`] = nestedValue; + mismatches[`${key}${nestedKey === "value" ? "" : `.${nestedKey}`}`] = nestedValue; } } } else if (actual[key] !== expected[key]) { diff --git a/tests/setup.ts b/tests/setup.ts new file mode 100644 index 00000000..a5651f81 --- /dev/null +++ b/tests/setup.ts @@ -0,0 +1,80 @@ +import { expect } from "vitest"; + +interface CustomMatchers { + toContainHeaders(expectedHeaders: Record): R; +} + +declare module "vitest" { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} + +expect.extend({ + toContainHeaders(actual: unknown, expectedHeaders: Record) { + const isHeaders = actual instanceof Headers; + const isPlainObject = typeof actual === "object" && actual !== null && !Array.isArray(actual); + + if (!isHeaders && !isPlainObject) { + throw new TypeError("Received value must be an instance of Headers or a plain object!"); + } + + if (typeof expectedHeaders !== "object" || expectedHeaders === null || Array.isArray(expectedHeaders)) { + throw new TypeError("Expected headers must be a plain object!"); + } + + const missingHeaders: string[] = []; + const mismatchedHeaders: Array<{ key: string; expected: string; actual: string | null }> = []; + + for (const [key, value] of Object.entries(expectedHeaders)) { + let actualValue: string | null = null; + + if (isHeaders) { + // Headers.get() is already case-insensitive + actualValue = (actual as Headers).get(key); + } else { + // For plain objects, do case-insensitive lookup + const actualObj = actual as Record; + const lowerKey = key.toLowerCase(); + const foundKey = Object.keys(actualObj).find((k) => k.toLowerCase() === lowerKey); + actualValue = foundKey ? actualObj[foundKey] : null; + } + + if (actualValue === null || actualValue === undefined) { + missingHeaders.push(key); + } else if (actualValue !== value) { + mismatchedHeaders.push({ key, expected: value, actual: actualValue }); + } + } + + const pass = missingHeaders.length === 0 && mismatchedHeaders.length === 0; + + const actualType = isHeaders ? "Headers" : "object"; + + if (pass) { + return { + message: () => `expected ${actualType} not to contain ${this.utils.printExpected(expectedHeaders)}`, + pass: true, + }; + } else { + const messages: string[] = []; + + if (missingHeaders.length > 0) { + messages.push(`Missing headers: ${this.utils.printExpected(missingHeaders.join(", "))}`); + } + + if (mismatchedHeaders.length > 0) { + const mismatches = mismatchedHeaders.map( + ({ key, expected, actual }) => + `${key}: expected ${this.utils.printExpected(expected)} but got ${this.utils.printReceived(actual)}`, + ); + messages.push(mismatches.join("\n")); + } + + return { + message: () => + `expected ${actualType} to contain ${this.utils.printExpected(expectedHeaders)}\n\n${messages.join("\n")}`, + pass: false, + }; + } + }, +}); diff --git a/tests/tsconfig.json b/tests/tsconfig.json index 10185ed2..a477df47 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "outDir": null, "rootDir": "..", - "baseUrl": ".." + "baseUrl": "..", + "types": ["vitest/globals"] }, "include": ["../src", "../tests"], "exclude": [] diff --git a/tests/unit/auth/BasicAuth.test.ts b/tests/unit/auth/BasicAuth.test.ts index 79ef9799..9b512336 100644 --- a/tests/unit/auth/BasicAuth.test.ts +++ b/tests/unit/auth/BasicAuth.test.ts @@ -1,21 +1,91 @@ import { BasicAuth } from "../../../src/core/auth/BasicAuth"; describe("BasicAuth", () => { + interface ToHeaderTestCase { + description: string; + input: { username: string; password: string }; + expected: string; + } + + interface FromHeaderTestCase { + description: string; + input: string; + expected: { username: string; password: string }; + } + + interface ErrorTestCase { + description: string; + input: string; + expectedError: string; + } + describe("toAuthorizationHeader", () => { - it("correctly converts to header", () => { - expect( - BasicAuth.toAuthorizationHeader({ - username: "username", - password: "password", - }), - ).toBe("Basic dXNlcm5hbWU6cGFzc3dvcmQ="); + const toHeaderTests: ToHeaderTestCase[] = [ + { + description: "correctly converts to header", + input: { username: "username", password: "password" }, + expected: "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", + }, + ]; + + toHeaderTests.forEach(({ description, input, expected }) => { + it(description, () => { + expect(BasicAuth.toAuthorizationHeader(input)).toBe(expected); + }); }); }); + describe("fromAuthorizationHeader", () => { - it("correctly parses header", () => { - expect(BasicAuth.fromAuthorizationHeader("Basic dXNlcm5hbWU6cGFzc3dvcmQ=")).toEqual({ - username: "username", - password: "password", + const fromHeaderTests: FromHeaderTestCase[] = [ + { + description: "correctly parses header", + input: "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", + expected: { username: "username", password: "password" }, + }, + { + description: "handles password with colons", + input: "Basic dXNlcjpwYXNzOndvcmQ=", + expected: { username: "user", password: "pass:word" }, + }, + { + description: "handles empty username and password (just colon)", + input: "Basic Og==", + expected: { username: "", password: "" }, + }, + { + description: "handles empty username", + input: "Basic OnBhc3N3b3Jk", + expected: { username: "", password: "password" }, + }, + { + description: "handles empty password", + input: "Basic dXNlcm5hbWU6", + expected: { username: "username", password: "" }, + }, + ]; + + fromHeaderTests.forEach(({ description, input, expected }) => { + it(description, () => { + expect(BasicAuth.fromAuthorizationHeader(input)).toEqual(expected); + }); + }); + + const errorTests: ErrorTestCase[] = [ + { + description: "throws error for completely empty credentials", + input: "Basic ", + expectedError: "Invalid basic auth", + }, + { + description: "throws error for credentials without colon", + input: "Basic dXNlcm5hbWU=", + expectedError: "Invalid basic auth", + }, + ]; + + errorTests.forEach(({ description, input, expectedError }) => { + it(description, () => { + expect(() => BasicAuth.fromAuthorizationHeader(input)).toThrow(expectedError); }); }); }); diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts index f983f08a..60df2b5e 100644 --- a/tests/unit/fetcher/Fetcher.test.ts +++ b/tests/unit/fetcher/Fetcher.test.ts @@ -1,9 +1,8 @@ import fs from "fs"; -import stream from "stream"; import { join } from "path"; - -import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; +import stream from "stream"; import type { BinaryResponse } from "../../../src/core"; +import { type Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; describe("Test fetcherImpl", () => { it("should handle successful request", async () => { @@ -14,10 +13,11 @@ describe("Test fetcherImpl", () => { body: { data: "test" }, contentType: "application/json", requestType: "json", + maxRetries: 0, responseType: "json", }; - global.fetch = jest.fn().mockResolvedValue( + global.fetch = vi.fn().mockResolvedValue( new Response(JSON.stringify({ data: "test" }), { status: 200, statusText: "OK", @@ -34,7 +34,7 @@ describe("Test fetcherImpl", () => { "https://httpbin.org/post", expect.objectContaining({ method: "POST", - headers: expect.objectContaining({ "X-Test": "x-test-header" }), + headers: expect.toContainHeaders({ "X-Test": "x-test-header" }), body: JSON.stringify({ data: "test" }), }), ); @@ -48,11 +48,12 @@ describe("Test fetcherImpl", () => { headers: { "X-Test": "x-test-header" }, contentType: "application/octet-stream", requestType: "bytes", + maxRetries: 0, responseType: "json", body: fs.createReadStream(join(__dirname, "test-file.txt")), }; - global.fetch = jest.fn().mockResolvedValue( + global.fetch = vi.fn().mockResolvedValue( new Response(JSON.stringify({ data: "test" }), { status: 200, statusText: "OK", @@ -65,7 +66,7 @@ describe("Test fetcherImpl", () => { url, expect.objectContaining({ method: "POST", - headers: expect.objectContaining({ "X-Test": "x-test-header" }), + headers: expect.toContainHeaders({ "X-Test": "x-test-header" }), body: expect.any(fs.ReadStream), }), ); @@ -81,10 +82,11 @@ describe("Test fetcherImpl", () => { url, method: "GET", headers: { "X-Test": "x-test-header" }, + maxRetries: 0, responseType: "binary-response", }; - global.fetch = jest.fn().mockResolvedValue( + global.fetch = vi.fn().mockResolvedValue( new Response( stream.Readable.toWeb(fs.createReadStream(join(__dirname, "test-file.txt"))) as ReadableStream, { @@ -100,7 +102,7 @@ describe("Test fetcherImpl", () => { url, expect.objectContaining({ method: "GET", - headers: expect.objectContaining({ "X-Test": "x-test-header" }), + headers: expect.toContainHeaders({ "X-Test": "x-test-header" }), }), ); expect(result.ok).toBe(true); @@ -126,10 +128,11 @@ describe("Test fetcherImpl", () => { url, method: "GET", headers: { "X-Test": "x-test-header" }, + maxRetries: 0, responseType: "binary-response", }; - global.fetch = jest.fn().mockResolvedValue( + global.fetch = vi.fn().mockResolvedValue( new Response( stream.Readable.toWeb(fs.createReadStream(join(__dirname, "test-file.txt"))) as ReadableStream, { @@ -145,7 +148,7 @@ describe("Test fetcherImpl", () => { url, expect.objectContaining({ method: "GET", - headers: expect.objectContaining({ "X-Test": "x-test-header" }), + headers: expect.toContainHeaders({ "X-Test": "x-test-header" }), }), ); expect(result.ok).toBe(true); @@ -171,10 +174,11 @@ describe("Test fetcherImpl", () => { url, method: "GET", headers: { "X-Test": "x-test-header" }, + maxRetries: 0, responseType: "binary-response", }; - global.fetch = jest.fn().mockResolvedValue( + global.fetch = vi.fn().mockResolvedValue( new Response( stream.Readable.toWeb(fs.createReadStream(join(__dirname, "test-file.txt"))) as ReadableStream, { @@ -190,7 +194,7 @@ describe("Test fetcherImpl", () => { url, expect.objectContaining({ method: "GET", - headers: expect.objectContaining({ "X-Test": "x-test-header" }), + headers: expect.toContainHeaders({ "X-Test": "x-test-header" }), }), ); expect(result.ok).toBe(true); @@ -214,10 +218,11 @@ describe("Test fetcherImpl", () => { url, method: "GET", headers: { "X-Test": "x-test-header" }, + maxRetries: 0, responseType: "binary-response", }; - global.fetch = jest.fn().mockResolvedValue( + global.fetch = vi.fn().mockResolvedValue( new Response( stream.Readable.toWeb(fs.createReadStream(join(__dirname, "test-file.txt"))) as ReadableStream, { @@ -233,7 +238,7 @@ describe("Test fetcherImpl", () => { url, expect.objectContaining({ method: "GET", - headers: expect.objectContaining({ "X-Test": "x-test-header" }), + headers: expect.toContainHeaders({ "X-Test": "x-test-header" }), }), ); expect(result.ok).toBe(true); diff --git a/tests/unit/fetcher/HttpResponsePromise.test.ts b/tests/unit/fetcher/HttpResponsePromise.test.ts index 2216a33e..2ec008e5 100644 --- a/tests/unit/fetcher/HttpResponsePromise.test.ts +++ b/tests/unit/fetcher/HttpResponsePromise.test.ts @@ -1,7 +1,7 @@ -import { beforeEach, describe, expect, it, jest } from "@jest/globals"; +import { beforeEach, describe, expect, it, vi } from "vitest"; import { HttpResponsePromise } from "../../../src/core/fetcher/HttpResponsePromise"; -import { RawResponse, WithRawResponse } from "../../../src/core/fetcher/RawResponse"; +import type { RawResponse, WithRawResponse } from "../../../src/core/fetcher/RawResponse"; describe("HttpResponsePromise", () => { const mockRawResponse: RawResponse = { @@ -20,7 +20,7 @@ describe("HttpResponsePromise", () => { describe("fromFunction", () => { it("should create an HttpResponsePromise from a function", async () => { - const mockFn = jest + const mockFn = vi .fn<(arg1: string, arg2: string) => Promise>>() .mockResolvedValue(mockWithRawResponse); @@ -111,7 +111,7 @@ describe("HttpResponsePromise", () => { reject(new Error("Test error")); }); - const catchSpy = jest.fn(); + const catchSpy = vi.fn(); await errorResponsePromise.catch(catchSpy); expect(catchSpy).toHaveBeenCalled(); @@ -121,7 +121,7 @@ describe("HttpResponsePromise", () => { }); it("should support finally() method", async () => { - const finallySpy = jest.fn(); + const finallySpy = vi.fn(); await responsePromise.finally(finallySpy); expect(finallySpy).toHaveBeenCalled(); diff --git a/tests/unit/fetcher/RawResponse.test.ts b/tests/unit/fetcher/RawResponse.test.ts index 9ccd5e1e..375ee3f3 100644 --- a/tests/unit/fetcher/RawResponse.test.ts +++ b/tests/unit/fetcher/RawResponse.test.ts @@ -1,4 +1,4 @@ -import { describe, expect, it } from "@jest/globals"; +import { describe, expect, it } from "vitest"; import { toRawResponse } from "../../../src/core/fetcher/RawResponse"; diff --git a/tests/unit/fetcher/createRequestUrl.test.ts b/tests/unit/fetcher/createRequestUrl.test.ts index 06e03b2c..a92f1b5e 100644 --- a/tests/unit/fetcher/createRequestUrl.test.ts +++ b/tests/unit/fetcher/createRequestUrl.test.ts @@ -1,160 +1,163 @@ import { createRequestUrl } from "../../../src/core/fetcher/createRequestUrl"; describe("Test createRequestUrl", () => { - it("should return the base URL when no query parameters are provided", () => { - const baseUrl = "https://api.example.com"; - expect(createRequestUrl(baseUrl)).toBe(baseUrl); - }); - - it("should append simple query parameters", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { key: "value", another: "param" }; - expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?key=value&another=param"); - }); - - it("should handle array query parameters", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { items: ["a", "b", "c"] }; - expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?items=a&items=b&items=c"); - }); - - it("should handle object query parameters", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { filter: { name: "John", age: 30 } }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?filter%5Bname%5D=John&filter%5Bage%5D=30", - ); - }); - - it("should handle mixed types of query parameters", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { - simple: "value", - array: ["x", "y"], - object: { key: "value" }, - }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?simple=value&array=x&array=y&object%5Bkey%5D=value", - ); - }); - - it("should handle empty query parameters object", () => { - const baseUrl = "https://api.example.com"; - expect(createRequestUrl(baseUrl, {})).toBe(baseUrl); - }); - - it("should encode special characters in query parameters", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { special: "a&b=c d" }; - expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?special=a%26b%3Dc%20d"); - }); - - // Additional tests for edge cases and different value types - it("should handle numeric values", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { count: 42, price: 19.99, active: 1, inactive: 0 }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?count=42&price=19.99&active=1&inactive=0", - ); - }); - - it("should handle boolean values", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { enabled: true, disabled: false }; - expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?enabled=true&disabled=false"); - }); - - it("should handle null and undefined values", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { - valid: "value", - nullValue: null, - undefinedValue: undefined, - emptyString: "", - }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?valid=value&nullValue=&emptyString=", - ); - }); - - it("should handle deeply nested objects", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { - user: { - profile: { - name: "John", - settings: { theme: "dark" }, + const BASE_URL = "https://api.example.com"; + + interface TestCase { + description: string; + baseUrl: string; + queryParams?: Record; + expected: string; + } + + const testCases: TestCase[] = [ + { + description: "should return the base URL when no query parameters are provided", + baseUrl: BASE_URL, + expected: BASE_URL, + }, + { + description: "should append simple query parameters", + baseUrl: BASE_URL, + queryParams: { key: "value", another: "param" }, + expected: "https://api.example.com?key=value&another=param", + }, + { + description: "should handle array query parameters", + baseUrl: BASE_URL, + queryParams: { items: ["a", "b", "c"] }, + expected: "https://api.example.com?items=a&items=b&items=c", + }, + { + description: "should handle object query parameters", + baseUrl: BASE_URL, + queryParams: { filter: { name: "John", age: 30 } }, + expected: "https://api.example.com?filter%5Bname%5D=John&filter%5Bage%5D=30", + }, + { + description: "should handle mixed types of query parameters", + baseUrl: BASE_URL, + queryParams: { + simple: "value", + array: ["x", "y"], + object: { key: "value" }, + }, + expected: "https://api.example.com?simple=value&array=x&array=y&object%5Bkey%5D=value", + }, + { + description: "should handle empty query parameters object", + baseUrl: BASE_URL, + queryParams: {}, + expected: BASE_URL, + }, + { + description: "should encode special characters in query parameters", + baseUrl: BASE_URL, + queryParams: { special: "a&b=c d" }, + expected: "https://api.example.com?special=a%26b%3Dc%20d", + }, + { + description: "should handle numeric values", + baseUrl: BASE_URL, + queryParams: { count: 42, price: 19.99, active: 1, inactive: 0 }, + expected: "https://api.example.com?count=42&price=19.99&active=1&inactive=0", + }, + { + description: "should handle boolean values", + baseUrl: BASE_URL, + queryParams: { enabled: true, disabled: false }, + expected: "https://api.example.com?enabled=true&disabled=false", + }, + { + description: "should handle null and undefined values", + baseUrl: BASE_URL, + queryParams: { + valid: "value", + nullValue: null, + undefinedValue: undefined, + emptyString: "", + }, + expected: "https://api.example.com?valid=value&nullValue=&emptyString=", + }, + { + description: "should handle deeply nested objects", + baseUrl: BASE_URL, + queryParams: { + user: { + profile: { + name: "John", + settings: { theme: "dark" }, + }, }, }, - }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?user%5Bprofile%5D%5Bname%5D=John&user%5Bprofile%5D%5Bsettings%5D%5Btheme%5D=dark", - ); - }); - - it("should handle arrays of objects", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { - users: [ - { name: "John", age: 30 }, - { name: "Jane", age: 25 }, - ], - }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?users%5Bname%5D=John&users%5Bage%5D=30&users%5Bname%5D=Jane&users%5Bage%5D=25", - ); - }); - - it("should handle mixed arrays", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { - mixed: ["string", 42, true, { key: "value" }], - }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?mixed=string&mixed=42&mixed=true&mixed%5Bkey%5D=value", - ); - }); - - it("should handle empty arrays", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { emptyArray: [] }; - expect(createRequestUrl(baseUrl, queryParams)).toBe(baseUrl); - }); - - it("should handle empty objects", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { emptyObject: {} }; - expect(createRequestUrl(baseUrl, queryParams)).toBe(baseUrl); - }); - - it("should handle special characters in keys", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { "key with spaces": "value", "key[with]brackets": "value" }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?key%20with%20spaces=value&key%5Bwith%5Dbrackets=value", - ); - }); - - it("should handle URL with existing query parameters", () => { - const baseUrl = "https://api.example.com?existing=param"; - const queryParams = { new: "value" }; - expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?existing=param?new=value"); - }); - - it("should handle complex nested structures", () => { - const baseUrl = "https://api.example.com"; - const queryParams = { - filters: { - status: ["active", "pending"], - category: { - type: "electronics", - subcategories: ["phones", "laptops"], + expected: + "https://api.example.com?user%5Bprofile%5D%5Bname%5D=John&user%5Bprofile%5D%5Bsettings%5D%5Btheme%5D=dark", + }, + { + description: "should handle arrays of objects", + baseUrl: BASE_URL, + queryParams: { + users: [ + { name: "John", age: 30 }, + { name: "Jane", age: 25 }, + ], + }, + expected: + "https://api.example.com?users%5Bname%5D=John&users%5Bage%5D=30&users%5Bname%5D=Jane&users%5Bage%5D=25", + }, + { + description: "should handle mixed arrays", + baseUrl: BASE_URL, + queryParams: { + mixed: ["string", 42, true, { key: "value" }], + }, + expected: "https://api.example.com?mixed=string&mixed=42&mixed=true&mixed%5Bkey%5D=value", + }, + { + description: "should handle empty arrays", + baseUrl: BASE_URL, + queryParams: { emptyArray: [] }, + expected: BASE_URL, + }, + { + description: "should handle empty objects", + baseUrl: BASE_URL, + queryParams: { emptyObject: {} }, + expected: BASE_URL, + }, + { + description: "should handle special characters in keys", + baseUrl: BASE_URL, + queryParams: { "key with spaces": "value", "key[with]brackets": "value" }, + expected: "https://api.example.com?key%20with%20spaces=value&key%5Bwith%5Dbrackets=value", + }, + { + description: "should handle URL with existing query parameters", + baseUrl: "https://api.example.com?existing=param", + queryParams: { new: "value" }, + expected: "https://api.example.com?existing=param?new=value", + }, + { + description: "should handle complex nested structures", + baseUrl: BASE_URL, + queryParams: { + filters: { + status: ["active", "pending"], + category: { + type: "electronics", + subcategories: ["phones", "laptops"], + }, }, + sort: { field: "name", direction: "asc" }, }, - sort: { field: "name", direction: "asc" }, - }; - expect(createRequestUrl(baseUrl, queryParams)).toBe( - "https://api.example.com?filters%5Bstatus%5D=active&filters%5Bstatus%5D=pending&filters%5Bcategory%5D%5Btype%5D=electronics&filters%5Bcategory%5D%5Bsubcategories%5D=phones&filters%5Bcategory%5D%5Bsubcategories%5D=laptops&sort%5Bfield%5D=name&sort%5Bdirection%5D=asc", - ); + expected: + "https://api.example.com?filters%5Bstatus%5D=active&filters%5Bstatus%5D=pending&filters%5Bcategory%5D%5Btype%5D=electronics&filters%5Bcategory%5D%5Bsubcategories%5D=phones&filters%5Bcategory%5D%5Bsubcategories%5D=laptops&sort%5Bfield%5D=name&sort%5Bdirection%5D=asc", + }, + ]; + + testCases.forEach(({ description, baseUrl, queryParams, expected }) => { + it(description, () => { + expect(createRequestUrl(baseUrl, queryParams)).toBe(expected); + }); }); }); diff --git a/tests/unit/fetcher/getRequestBody.test.ts b/tests/unit/fetcher/getRequestBody.test.ts index e864c8b5..8a6c3a57 100644 --- a/tests/unit/fetcher/getRequestBody.test.ts +++ b/tests/unit/fetcher/getRequestBody.test.ts @@ -2,15 +2,117 @@ import { getRequestBody } from "../../../src/core/fetcher/getRequestBody"; import { RUNTIME } from "../../../src/core/runtime"; describe("Test getRequestBody", () => { - it("should stringify body if not FormData in Node environment", async () => { - if (RUNTIME.type === "node") { - const body = { key: "value" }; + interface TestCase { + description: string; + input: any; + type: "json" | "form" | "file" | "bytes" | "other"; + expected: any; + skipCondition?: () => boolean; + } + + const testCases: TestCase[] = [ + { + description: "should stringify body if not FormData in Node environment", + input: { key: "value" }, + type: "json", + expected: '{"key":"value"}', + skipCondition: () => RUNTIME.type !== "node", + }, + { + description: "should stringify body if not FormData in browser environment", + input: { key: "value" }, + type: "json", + expected: '{"key":"value"}', + skipCondition: () => RUNTIME.type !== "browser", + }, + { + description: "should return the Uint8Array", + input: new Uint8Array([1, 2, 3]), + type: "bytes", + expected: new Uint8Array([1, 2, 3]), + }, + { + description: "should serialize objects for form-urlencoded content type", + input: { username: "johndoe", email: "john@example.com" }, + type: "form", + expected: "username=johndoe&email=john%40example.com", + }, + { + description: "should serialize complex nested objects and arrays for form-urlencoded content type", + input: { + user: { + profile: { + name: "John Doe", + settings: { + theme: "dark", + notifications: true, + }, + }, + tags: ["admin", "user"], + contacts: [ + { type: "email", value: "john@example.com" }, + { type: "phone", value: "+1234567890" }, + ], + }, + filters: { + status: ["active", "pending"], + metadata: { + created: "2024-01-01", + categories: ["electronics", "books"], + }, + }, + preferences: ["notifications", "updates"], + }, + type: "form", + expected: + "user%5Bprofile%5D%5Bname%5D=John%20Doe&" + + "user%5Bprofile%5D%5Bsettings%5D%5Btheme%5D=dark&" + + "user%5Bprofile%5D%5Bsettings%5D%5Bnotifications%5D=true&" + + "user%5Btags%5D=admin&" + + "user%5Btags%5D=user&" + + "user%5Bcontacts%5D%5Btype%5D=email&" + + "user%5Bcontacts%5D%5Bvalue%5D=john%40example.com&" + + "user%5Bcontacts%5D%5Btype%5D=phone&" + + "user%5Bcontacts%5D%5Bvalue%5D=%2B1234567890&" + + "filters%5Bstatus%5D=active&" + + "filters%5Bstatus%5D=pending&" + + "filters%5Bmetadata%5D%5Bcreated%5D=2024-01-01&" + + "filters%5Bmetadata%5D%5Bcategories%5D=electronics&" + + "filters%5Bmetadata%5D%5Bcategories%5D=books&" + + "preferences=notifications&" + + "preferences=updates", + }, + { + description: "should return the input for pre-serialized form-urlencoded strings", + input: "key=value&another=param", + type: "other", + expected: "key=value&another=param", + }, + { + description: "should JSON stringify objects", + input: { key: "value" }, + type: "json", + expected: '{"key":"value"}', + }, + ]; + + testCases.forEach(({ description, input, type, expected, skipCondition }) => { + it(description, async () => { + if (skipCondition?.()) { + return; + } + const result = await getRequestBody({ - body, - type: "json", + body: input, + type, }); - expect(result).toBe('{"key":"value"}'); - } + + if (input instanceof Uint8Array) { + expect(result).toBe(input); + } else { + expect(result).toBe(expected); + } + }); }); it("should return FormData in browser environment", async () => { @@ -24,42 +126,4 @@ describe("Test getRequestBody", () => { expect(result).toBe(formData); } }); - - it("should stringify body if not FormData in browser environment", async () => { - if (RUNTIME.type === "browser") { - const body = { key: "value" }; - const result = await getRequestBody({ - body, - type: "json", - }); - expect(result).toBe('{"key":"value"}'); - } - }); - - it("should return the Uint8Array", async () => { - const input = new Uint8Array([1, 2, 3]); - const result = await getRequestBody({ - body: input, - type: "bytes", - }); - expect(result).toBe(input); - }); - - it("should return the input for content-type 'application/x-www-form-urlencoded'", async () => { - const input = "key=value&another=param"; - const result = await getRequestBody({ - body: input, - type: "other", - }); - expect(result).toBe(input); - }); - - it("should JSON stringify objects", async () => { - const input = { key: "value" }; - const result = await getRequestBody({ - body: input, - type: "json", - }); - expect(result).toBe('{"key":"value"}'); - }); }); diff --git a/tests/unit/fetcher/getResponseBody.test.ts b/tests/unit/fetcher/getResponseBody.test.ts index 400782f5..ad6be7fc 100644 --- a/tests/unit/fetcher/getResponseBody.test.ts +++ b/tests/unit/fetcher/getResponseBody.test.ts @@ -1,7 +1,61 @@ -import { RUNTIME } from "../../../src/core/runtime"; import { getResponseBody } from "../../../src/core/fetcher/getResponseBody"; +import { RUNTIME } from "../../../src/core/runtime"; + describe("Test getResponseBody", () => { + interface SimpleTestCase { + description: string; + responseData: string | Record; + responseType?: "blob" | "sse" | "streaming" | "text"; + expected: any; + skipCondition?: () => boolean; + } + + const simpleTestCases: SimpleTestCase[] = [ + { + description: "should handle text response type", + responseData: "test text", + responseType: "text", + expected: "test text", + }, + { + description: "should handle JSON response", + responseData: { key: "value" }, + expected: { key: "value" }, + }, + { + description: "should handle empty response", + responseData: "", + expected: undefined, + }, + { + description: "should handle non-JSON response", + responseData: "invalid json", + expected: { + ok: false, + error: { + reason: "non-json", + statusCode: 200, + rawBody: "invalid json", + }, + }, + }, + ]; + + simpleTestCases.forEach(({ description, responseData, responseType, expected, skipCondition }) => { + it(description, async () => { + if (skipCondition?.()) { + return; + } + + const mockResponse = new Response( + typeof responseData === "string" ? responseData : JSON.stringify(responseData), + ); + const result = await getResponseBody(mockResponse, responseType); + expect(result).toEqual(expected); + }); + }); + it("should handle blob response type", async () => { const mockBlob = new Blob(["test"], { type: "text/plain" }); const mockResponse = new Response(mockBlob); @@ -20,7 +74,6 @@ describe("Test getResponseBody", () => { }); it("should handle streaming response type", async () => { - // Create a ReadableStream with some test data const encoder = new TextEncoder(); const testData = "test stream data"; const mockStream = new ReadableStream({ @@ -35,43 +88,10 @@ describe("Test getResponseBody", () => { expect(result).toBeInstanceOf(ReadableStream); - // Read and verify the stream content const reader = result.getReader(); const decoder = new TextDecoder(); const { value } = await reader.read(); const streamContent = decoder.decode(value); expect(streamContent).toBe(testData); }); - - it("should handle text response type", async () => { - const mockResponse = new Response("test text"); - const result = await getResponseBody(mockResponse, "text"); - expect(result).toBe("test text"); - }); - - it("should handle JSON response", async () => { - const mockJson = { key: "value" }; - const mockResponse = new Response(JSON.stringify(mockJson)); - const result = await getResponseBody(mockResponse); - expect(result).toEqual(mockJson); - }); - - it("should handle empty response", async () => { - const mockResponse = new Response(""); - const result = await getResponseBody(mockResponse); - expect(result).toBeUndefined(); - }); - - it("should handle non-JSON response", async () => { - const mockResponse = new Response("invalid json"); - const result = await getResponseBody(mockResponse); - expect(result).toEqual({ - ok: false, - error: { - reason: "non-json", - statusCode: 200, - rawBody: "invalid json", - }, - }); - }); }); diff --git a/tests/unit/fetcher/logging.test.ts b/tests/unit/fetcher/logging.test.ts new file mode 100644 index 00000000..366c9b6c --- /dev/null +++ b/tests/unit/fetcher/logging.test.ts @@ -0,0 +1,517 @@ +import { fetcherImpl } from "../../../src/core/fetcher/Fetcher"; + +function createMockLogger() { + return { + debug: vi.fn(), + info: vi.fn(), + warn: vi.fn(), + error: vi.fn(), + }; +} + +function mockSuccessResponse(data: unknown = { data: "test" }, status = 200, statusText = "OK") { + global.fetch = vi.fn().mockResolvedValue( + new Response(JSON.stringify(data), { + status, + statusText, + }), + ); +} + +function mockErrorResponse(data: unknown = { error: "Error" }, status = 404, statusText = "Not Found") { + global.fetch = vi.fn().mockResolvedValue( + new Response(JSON.stringify(data), { + status, + statusText, + }), + ); +} + +describe("Fetcher Logging Integration", () => { + describe("Request Logging", () => { + it("should log successful request at debug level", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "POST", + headers: { "Content-Type": "application/json" }, + body: { test: "data" }, + contentType: "application/json", + requestType: "json", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + method: "POST", + url: "https://example.com/api", + headers: expect.toContainHeaders({ + "Content-Type": "application/json", + }), + hasBody: true, + }), + ); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "HTTP request succeeded", + expect.objectContaining({ + method: "POST", + url: "https://example.com/api", + statusCode: 200, + }), + ); + }); + + it("should not log debug messages at info level for successful requests", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "info", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).not.toHaveBeenCalled(); + expect(mockLogger.info).not.toHaveBeenCalled(); + }); + + it("should log request with body flag", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "POST", + body: { data: "test" }, + contentType: "application/json", + requestType: "json", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + hasBody: true, + }), + ); + }); + + it("should log request without body flag", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + hasBody: false, + }), + ); + }); + + it("should not log when silent mode is enabled", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: true, + }, + }); + + expect(mockLogger.debug).not.toHaveBeenCalled(); + expect(mockLogger.info).not.toHaveBeenCalled(); + expect(mockLogger.warn).not.toHaveBeenCalled(); + expect(mockLogger.error).not.toHaveBeenCalled(); + }); + + it("should not log when no logging config is provided", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + }); + + expect(mockLogger.debug).not.toHaveBeenCalled(); + }); + }); + + describe("Error Logging", () => { + it("should log 4xx errors at error level", async () => { + const mockLogger = createMockLogger(); + mockErrorResponse({ error: "Not found" }, 404, "Not Found"); + + const result = await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "error", + logger: mockLogger, + silent: false, + }, + }); + + expect(result.ok).toBe(false); + expect(mockLogger.error).toHaveBeenCalledWith( + "HTTP request failed with error status", + expect.objectContaining({ + method: "GET", + url: "https://example.com/api", + statusCode: 404, + }), + ); + }); + + it("should log 5xx errors at error level", async () => { + const mockLogger = createMockLogger(); + mockErrorResponse({ error: "Internal error" }, 500, "Internal Server Error"); + + const result = await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "error", + logger: mockLogger, + silent: false, + }, + }); + + expect(result.ok).toBe(false); + expect(mockLogger.error).toHaveBeenCalledWith( + "HTTP request failed with error status", + expect.objectContaining({ + method: "GET", + url: "https://example.com/api", + statusCode: 500, + }), + ); + }); + + it("should log aborted request errors", async () => { + const mockLogger = createMockLogger(); + + const abortController = new AbortController(); + abortController.abort(); + + global.fetch = vi.fn().mockRejectedValue(new Error("Aborted")); + + const result = await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + abortSignal: abortController.signal, + maxRetries: 0, + logging: { + level: "error", + logger: mockLogger, + silent: false, + }, + }); + + expect(result.ok).toBe(false); + expect(mockLogger.error).toHaveBeenCalledWith( + "HTTP request was aborted", + expect.objectContaining({ + method: "GET", + url: "https://example.com/api", + }), + ); + }); + + it("should log timeout errors", async () => { + const mockLogger = createMockLogger(); + + const timeoutError = new Error("Request timeout"); + timeoutError.name = "AbortError"; + + global.fetch = vi.fn().mockRejectedValue(timeoutError); + + const result = await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "error", + logger: mockLogger, + silent: false, + }, + }); + + expect(result.ok).toBe(false); + expect(mockLogger.error).toHaveBeenCalledWith( + "HTTP request timed out", + expect.objectContaining({ + method: "GET", + url: "https://example.com/api", + timeoutMs: undefined, + }), + ); + }); + + it("should log unknown errors", async () => { + const mockLogger = createMockLogger(); + + const unknownError = new Error("Unknown error"); + + global.fetch = vi.fn().mockRejectedValue(unknownError); + + const result = await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "error", + logger: mockLogger, + silent: false, + }, + }); + + expect(result.ok).toBe(false); + expect(mockLogger.error).toHaveBeenCalledWith( + "HTTP request failed with error", + expect.objectContaining({ + method: "GET", + url: "https://example.com/api", + errorMessage: "Unknown error", + }), + ); + }); + }); + + describe("Logging with Redaction", () => { + it("should redact sensitive data in error logs", async () => { + const mockLogger = createMockLogger(); + mockErrorResponse({ error: "Unauthorized" }, 401, "Unauthorized"); + + await fetcherImpl({ + url: "https://example.com/api?api_key=secret", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "error", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.error).toHaveBeenCalledWith( + "HTTP request failed with error status", + expect.objectContaining({ + url: "https://example.com/api?api_key=[REDACTED]", + }), + ); + }); + }); + + describe("Different HTTP Methods", () => { + it("should log GET requests", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + method: "GET", + }), + ); + }); + + it("should log POST requests", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse({ data: "test" }, 201, "Created"); + + await fetcherImpl({ + url: "https://example.com/api", + method: "POST", + body: { data: "test" }, + contentType: "application/json", + requestType: "json", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + method: "POST", + }), + ); + }); + + it("should log PUT requests", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "PUT", + body: { data: "test" }, + contentType: "application/json", + requestType: "json", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + method: "PUT", + }), + ); + }); + + it("should log DELETE requests", async () => { + const mockLogger = createMockLogger(); + global.fetch = vi.fn().mockResolvedValue( + new Response(null, { + status: 200, + statusText: "OK", + }), + ); + + await fetcherImpl({ + url: "https://example.com/api", + method: "DELETE", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + method: "DELETE", + }), + ); + }); + }); + + describe("Status Code Logging", () => { + it("should log 2xx success status codes", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse({ data: "test" }, 201, "Created"); + + await fetcherImpl({ + url: "https://example.com/api", + method: "POST", + body: { data: "test" }, + contentType: "application/json", + requestType: "json", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "HTTP request succeeded", + expect.objectContaining({ + statusCode: 201, + }), + ); + }); + + it("should log 3xx redirect status codes as success", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse({ data: "test" }, 301, "Moved Permanently"); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "HTTP request succeeded", + expect.objectContaining({ + statusCode: 301, + }), + ); + }); + }); +}); diff --git a/tests/unit/fetcher/makeRequest.test.ts b/tests/unit/fetcher/makeRequest.test.ts index 43ed9d11..ea49466a 100644 --- a/tests/unit/fetcher/makeRequest.test.ts +++ b/tests/unit/fetcher/makeRequest.test.ts @@ -1,3 +1,4 @@ +import type { Mock } from "vitest"; import { makeRequest } from "../../../src/core/fetcher/makeRequest"; describe("Test makeRequest", () => { @@ -6,10 +7,10 @@ describe("Test makeRequest", () => { const mockHeaders = { "Content-Type": "application/json" }; const mockBody = JSON.stringify({ key: "value" }); - let mockFetch: jest.Mock; + let mockFetch: Mock; beforeEach(() => { - mockFetch = jest.fn(); + mockFetch = vi.fn(); mockFetch.mockResolvedValue(new Response(JSON.stringify({ test: "successful" }), { status: 200 })); }); diff --git a/tests/unit/fetcher/redacting.test.ts b/tests/unit/fetcher/redacting.test.ts new file mode 100644 index 00000000..d599376b --- /dev/null +++ b/tests/unit/fetcher/redacting.test.ts @@ -0,0 +1,1115 @@ +import { fetcherImpl } from "../../../src/core/fetcher/Fetcher"; + +function createMockLogger() { + return { + debug: vi.fn(), + info: vi.fn(), + warn: vi.fn(), + error: vi.fn(), + }; +} + +function mockSuccessResponse(data: unknown = { data: "test" }, status = 200, statusText = "OK") { + global.fetch = vi.fn().mockResolvedValue( + new Response(JSON.stringify(data), { + status, + statusText, + }), + ); +} + +describe("Redacting Logic", () => { + describe("Header Redaction", () => { + it("should redact authorization header", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { Authorization: "Bearer secret-token-12345" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + Authorization: "[REDACTED]", + }), + }), + ); + }); + + it("should redact api-key header (case-insensitive)", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { "X-API-KEY": "secret-api-key" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + "X-API-KEY": "[REDACTED]", + }), + }), + ); + }); + + it("should redact cookie header", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { Cookie: "session=abc123; token=xyz789" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + Cookie: "[REDACTED]", + }), + }), + ); + }); + + it("should redact x-auth-token header", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { "x-auth-token": "auth-token-12345" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + "x-auth-token": "[REDACTED]", + }), + }), + ); + }); + + it("should redact proxy-authorization header", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { "Proxy-Authorization": "Basic credentials" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + "Proxy-Authorization": "[REDACTED]", + }), + }), + ); + }); + + it("should redact x-csrf-token header", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { "X-CSRF-Token": "csrf-token-abc" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + "X-CSRF-Token": "[REDACTED]", + }), + }), + ); + }); + + it("should redact www-authenticate header", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { "WWW-Authenticate": "Bearer realm=example" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + "WWW-Authenticate": "[REDACTED]", + }), + }), + ); + }); + + it("should redact x-session-token header", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { "X-Session-Token": "session-token-xyz" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + "X-Session-Token": "[REDACTED]", + }), + }), + ); + }); + + it("should not redact non-sensitive headers", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { + "Content-Type": "application/json", + "User-Agent": "Test/1.0", + Accept: "application/json", + }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + "Content-Type": "application/json", + "User-Agent": "Test/1.0", + Accept: "application/json", + }), + }), + ); + }); + + it("should redact multiple sensitive headers at once", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + headers: { + Authorization: "Bearer token", + "X-API-Key": "api-key", + Cookie: "session=123", + "Content-Type": "application/json", + }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + headers: expect.toContainHeaders({ + Authorization: "[REDACTED]", + "X-API-Key": "[REDACTED]", + Cookie: "[REDACTED]", + "Content-Type": "application/json", + }), + }), + ); + }); + }); + + describe("Response Header Redaction", () => { + it("should redact Set-Cookie in response headers", async () => { + const mockLogger = createMockLogger(); + + const mockHeaders = new Headers(); + mockHeaders.set("Set-Cookie", "session=abc123; HttpOnly; Secure"); + mockHeaders.set("Content-Type", "application/json"); + + global.fetch = vi.fn().mockResolvedValue( + new Response(JSON.stringify({ data: "test" }), { + status: 200, + statusText: "OK", + headers: mockHeaders, + }), + ); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "HTTP request succeeded", + expect.objectContaining({ + responseHeaders: expect.toContainHeaders({ + "set-cookie": "[REDACTED]", + "content-type": "application/json", + }), + }), + ); + }); + + it("should redact authorization in response headers", async () => { + const mockLogger = createMockLogger(); + + const mockHeaders = new Headers(); + mockHeaders.set("Authorization", "Bearer token-123"); + mockHeaders.set("Content-Type", "application/json"); + + global.fetch = vi.fn().mockResolvedValue( + new Response(JSON.stringify({ data: "test" }), { + status: 200, + statusText: "OK", + headers: mockHeaders, + }), + ); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "HTTP request succeeded", + expect.objectContaining({ + responseHeaders: expect.toContainHeaders({ + authorization: "[REDACTED]", + "content-type": "application/json", + }), + }), + ); + }); + + it("should redact response headers in error responses", async () => { + const mockLogger = createMockLogger(); + + const mockHeaders = new Headers(); + mockHeaders.set("WWW-Authenticate", "Bearer realm=example"); + mockHeaders.set("Content-Type", "application/json"); + + global.fetch = vi.fn().mockResolvedValue( + new Response(JSON.stringify({ error: "Unauthorized" }), { + status: 401, + statusText: "Unauthorized", + headers: mockHeaders, + }), + ); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "error", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.error).toHaveBeenCalledWith( + "HTTP request failed with error status", + expect.objectContaining({ + responseHeaders: expect.toContainHeaders({ + "www-authenticate": "[REDACTED]", + "content-type": "application/json", + }), + }), + ); + }); + }); + + describe("Query Parameter Redaction", () => { + it("should redact api_key query parameter", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { api_key: "secret-key" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + api_key: "[REDACTED]", + }), + }), + ); + }); + + it("should redact token query parameter", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { token: "secret-token" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + token: "[REDACTED]", + }), + }), + ); + }); + + it("should redact access_token query parameter", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { access_token: "secret-access-token" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + access_token: "[REDACTED]", + }), + }), + ); + }); + + it("should redact password query parameter", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { password: "secret-password" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + password: "[REDACTED]", + }), + }), + ); + }); + + it("should redact secret query parameter", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { secret: "secret-value" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + secret: "[REDACTED]", + }), + }), + ); + }); + + it("should redact session_id query parameter", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { session_id: "session-123" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + session_id: "[REDACTED]", + }), + }), + ); + }); + + it("should not redact non-sensitive query parameters", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { + page: "1", + limit: "10", + sort: "name", + }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + page: "1", + limit: "10", + sort: "name", + }), + }), + ); + }); + + it("should not redact parameters containing 'auth' substring like 'author'", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { + author: "john", + authenticate: "false", + authorization_level: "user", + }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + author: "john", + authenticate: "false", + authorization_level: "user", + }), + }), + ); + }); + + it("should handle undefined query parameters", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: undefined, + }), + ); + }); + + it("should redact case-insensitive query parameters", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + queryParameters: { API_KEY: "secret-key", Token: "secret-token" }, + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + queryParameters: expect.objectContaining({ + API_KEY: "[REDACTED]", + Token: "[REDACTED]", + }), + }), + ); + }); + }); + + describe("URL Redaction", () => { + it("should redact credentials in URL", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://user:password@example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://[REDACTED]@example.com/api", + }), + ); + }); + + it("should redact api_key in query string", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?api_key=secret-key&page=1", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?api_key=[REDACTED]&page=1", + }), + ); + }); + + it("should redact token in query string", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?token=secret-token", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?token=[REDACTED]", + }), + ); + }); + + it("should redact password in query string", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?username=user&password=secret", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?username=user&password=[REDACTED]", + }), + ); + }); + + it("should not redact non-sensitive query strings", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?page=1&limit=10&sort=name", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?page=1&limit=10&sort=name", + }), + ); + }); + + it("should not redact URL parameters containing 'auth' substring like 'author'", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?author=john&authenticate=false&page=1", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?author=john&authenticate=false&page=1", + }), + ); + }); + + it("should handle URL with fragment", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?token=secret#section", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?token=[REDACTED]#section", + }), + ); + }); + + it("should redact URL-encoded query parameters", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?api%5Fkey=secret", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?api%5Fkey=[REDACTED]", + }), + ); + }); + + it("should handle URL without query string", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api", + }), + ); + }); + + it("should handle empty query string", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?", + }), + ); + }); + + it("should redact multiple sensitive parameters in URL", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?api_key=secret1&token=secret2&page=1", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?api_key=[REDACTED]&token=[REDACTED]&page=1", + }), + ); + }); + + it("should redact both credentials and query parameters", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://user:pass@example.com/api?token=secret", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://[REDACTED]@example.com/api?token=[REDACTED]", + }), + ); + }); + + it("should use fast path for URLs without sensitive keywords", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?page=1&limit=10&sort=name&filter=value", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?page=1&limit=10&sort=name&filter=value", + }), + ); + }); + + it("should handle query parameter without value", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?flag&token=secret", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?flag&token=[REDACTED]", + }), + ); + }); + + it("should handle URL with multiple @ symbols in credentials", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://user@example.com:pass@host.com/api", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://[REDACTED]@host.com/api", + }), + ); + }); + + it("should handle URL with @ in query parameter but not in credentials", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://example.com/api?email=user@example.com", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://example.com/api?email=user@example.com", + }), + ); + }); + + it("should handle URL with both credentials and @ in path", async () => { + const mockLogger = createMockLogger(); + mockSuccessResponse(); + + await fetcherImpl({ + url: "https://user:pass@example.com/users/@username", + method: "GET", + responseType: "json", + maxRetries: 0, + logging: { + level: "debug", + logger: mockLogger, + silent: false, + }, + }); + + expect(mockLogger.debug).toHaveBeenCalledWith( + "Making HTTP request", + expect.objectContaining({ + url: "https://[REDACTED]@example.com/users/@username", + }), + ); + }); + }); +}); diff --git a/tests/unit/fetcher/requestWithRetries.test.ts b/tests/unit/fetcher/requestWithRetries.test.ts index 6f9426fc..d2266136 100644 --- a/tests/unit/fetcher/requestWithRetries.test.ts +++ b/tests/unit/fetcher/requestWithRetries.test.ts @@ -1,28 +1,43 @@ +import type { Mock, MockInstance } from "vitest"; import { requestWithRetries } from "../../../src/core/fetcher/requestWithRetries"; describe("requestWithRetries", () => { - let mockFetch: jest.Mock; + let mockFetch: Mock; let originalMathRandom: typeof Math.random; - let setTimeoutSpy: jest.SpyInstance; + let setTimeoutSpy: MockInstance; beforeEach(() => { - mockFetch = jest.fn(); + mockFetch = vi.fn(); originalMathRandom = Math.random; - // Mock Math.random for consistent jitter - Math.random = jest.fn(() => 0.5); - - jest.useFakeTimers({ doNotFake: ["nextTick"] }); + Math.random = vi.fn(() => 0.5); + + vi.useFakeTimers({ + toFake: [ + "setTimeout", + "clearTimeout", + "setInterval", + "clearInterval", + "setImmediate", + "clearImmediate", + "Date", + "performance", + "requestAnimationFrame", + "cancelAnimationFrame", + "requestIdleCallback", + "cancelIdleCallback", + ], + }); }); afterEach(() => { Math.random = originalMathRandom; - jest.clearAllMocks(); - jest.clearAllTimers(); + vi.clearAllMocks(); + vi.clearAllTimers(); }); it("should retry on retryable status codes", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + setTimeoutSpy = vi.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -38,7 +53,7 @@ describe("requestWithRetries", () => { }); const responsePromise = requestWithRetries(() => mockFetch(), retryableStatuses.length); - await jest.runAllTimersAsync(); + await vi.runAllTimersAsync(); const response = await responsePromise; expect(mockFetch).toHaveBeenCalledTimes(retryableStatuses.length + 1); @@ -46,7 +61,7 @@ describe("requestWithRetries", () => { }); it("should respect maxRetries limit", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + setTimeoutSpy = vi.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -55,7 +70,7 @@ describe("requestWithRetries", () => { mockFetch.mockResolvedValue(new Response("", { status: 500 })); const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); - await jest.runAllTimersAsync(); + await vi.runAllTimersAsync(); const response = await responsePromise; expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1); @@ -63,7 +78,7 @@ describe("requestWithRetries", () => { }); it("should not retry on success status codes", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + setTimeoutSpy = vi.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -76,7 +91,7 @@ describe("requestWithRetries", () => { mockFetch.mockResolvedValueOnce(new Response("", { status })); const responsePromise = requestWithRetries(() => mockFetch(), 3); - await jest.runAllTimersAsync(); + await vi.runAllTimersAsync(); await responsePromise; expect(mockFetch).toHaveBeenCalledTimes(1); @@ -84,8 +99,69 @@ describe("requestWithRetries", () => { } }); + interface RetryHeaderTestCase { + description: string; + headerName: string; + headerValue: string | (() => string); + expectedDelayMin: number; + expectedDelayMax: number; + } + + const retryHeaderTests: RetryHeaderTestCase[] = [ + { + description: "should respect retry-after header with seconds value", + headerName: "retry-after", + headerValue: "5", + expectedDelayMin: 4000, + expectedDelayMax: 6000, + }, + { + description: "should respect retry-after header with HTTP date value", + headerName: "retry-after", + headerValue: () => new Date(Date.now() + 3000).toUTCString(), + expectedDelayMin: 2000, + expectedDelayMax: 4000, + }, + { + description: "should respect x-ratelimit-reset header", + headerName: "x-ratelimit-reset", + headerValue: () => Math.floor((Date.now() + 4000) / 1000).toString(), + expectedDelayMin: 3000, + expectedDelayMax: 6000, + }, + ]; + + retryHeaderTests.forEach(({ description, headerName, headerValue, expectedDelayMin, expectedDelayMax }) => { + it(description, async () => { + setTimeoutSpy = vi.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + process.nextTick(callback); + return null as any; + }); + + const value = typeof headerValue === "function" ? headerValue() : headerValue; + mockFetch + .mockResolvedValueOnce( + new Response("", { + status: 429, + headers: new Headers({ [headerName]: value }), + }), + ) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 1); + await vi.runAllTimersAsync(); + const response = await responsePromise; + + expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), expect.any(Number)); + const actualDelay = setTimeoutSpy.mock.calls[0][1]; + expect(actualDelay).toBeGreaterThan(expectedDelayMin); + expect(actualDelay).toBeLessThan(expectedDelayMax); + expect(response.status).toBe(200); + }); + }); + it("should apply correct exponential backoff with jitter", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + setTimeoutSpy = vi.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -95,10 +171,9 @@ describe("requestWithRetries", () => { const expectedDelays = [1000, 2000, 4000]; const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); - await jest.runAllTimersAsync(); + await vi.runAllTimersAsync(); await responsePromise; - // Verify setTimeout calls expect(setTimeoutSpy).toHaveBeenCalledTimes(expectedDelays.length); expectedDelays.forEach((delay, index) => { @@ -109,7 +184,7 @@ describe("requestWithRetries", () => { }); it("should handle concurrent retries independently", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + setTimeoutSpy = vi.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -123,94 +198,15 @@ describe("requestWithRetries", () => { const promise1 = requestWithRetries(() => mockFetch(), 1); const promise2 = requestWithRetries(() => mockFetch(), 1); - await jest.runAllTimersAsync(); + await vi.runAllTimersAsync(); const [response1, response2] = await Promise.all([promise1, promise2]); expect(response1.status).toBe(200); expect(response2.status).toBe(200); }); - it("should respect retry-after header with seconds value", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { - process.nextTick(callback); - return null as any; - }); - - mockFetch - .mockResolvedValueOnce( - new Response("", { - status: 429, - headers: new Headers({ "retry-after": "5" }), - }), - ) - .mockResolvedValueOnce(new Response("", { status: 200 })); - - const responsePromise = requestWithRetries(() => mockFetch(), 1); - await jest.runAllTimersAsync(); - const response = await responsePromise; - - expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 5000); // 5 seconds = 5000ms - expect(response.status).toBe(200); - }); - - it("should respect retry-after header with HTTP date value", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { - process.nextTick(callback); - return null as any; - }); - - const futureDate = new Date(Date.now() + 3000); // 3 seconds from now - mockFetch - .mockResolvedValueOnce( - new Response("", { - status: 429, - headers: new Headers({ "retry-after": futureDate.toUTCString() }), - }), - ) - .mockResolvedValueOnce(new Response("", { status: 200 })); - - const responsePromise = requestWithRetries(() => mockFetch(), 1); - await jest.runAllTimersAsync(); - const response = await responsePromise; - - // Should use the date-based delay (approximately 3000ms, but with jitter) - expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), expect.any(Number)); - const actualDelay = setTimeoutSpy.mock.calls[0][1]; - expect(actualDelay).toBeGreaterThan(2000); - expect(actualDelay).toBeLessThan(4000); - expect(response.status).toBe(200); - }); - - it("should respect x-ratelimit-reset header", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { - process.nextTick(callback); - return null as any; - }); - - const resetTime = Math.floor((Date.now() + 4000) / 1000); // 4 seconds from now in Unix timestamp - mockFetch - .mockResolvedValueOnce( - new Response("", { - status: 429, - headers: new Headers({ "x-ratelimit-reset": resetTime.toString() }), - }), - ) - .mockResolvedValueOnce(new Response("", { status: 200 })); - - const responsePromise = requestWithRetries(() => mockFetch(), 1); - await jest.runAllTimersAsync(); - const response = await responsePromise; - - // Should use the x-ratelimit-reset delay (approximately 4000ms, but with positive jitter) - expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), expect.any(Number)); - const actualDelay = setTimeoutSpy.mock.calls[0][1]; - expect(actualDelay).toBeGreaterThan(3000); - expect(actualDelay).toBeLessThan(6000); - expect(response.status).toBe(200); - }); - it("should cap delay at MAX_RETRY_DELAY for large header values", async () => { - setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + setTimeoutSpy = vi.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); @@ -225,11 +221,10 @@ describe("requestWithRetries", () => { .mockResolvedValueOnce(new Response("", { status: 200 })); const responsePromise = requestWithRetries(() => mockFetch(), 1); - await jest.runAllTimersAsync(); + await vi.runAllTimersAsync(); const response = await responsePromise; - // Should be capped at MAX_RETRY_DELAY (60000ms) with jitter applied - expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 60000); // Exactly MAX_RETRY_DELAY since jitter with 0.5 random keeps it at 60000 + expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 60000); expect(response.status).toBe(200); }); }); diff --git a/tests/unit/fetcher/signals.test.ts b/tests/unit/fetcher/signals.test.ts index 9cabfa07..d7b6d1e6 100644 --- a/tests/unit/fetcher/signals.test.ts +++ b/tests/unit/fetcher/signals.test.ts @@ -2,11 +2,11 @@ import { anySignal, getTimeoutSignal } from "../../../src/core/fetcher/signals"; describe("Test getTimeoutSignal", () => { beforeEach(() => { - jest.useFakeTimers(); + vi.useFakeTimers(); }); afterEach(() => { - jest.useRealTimers(); + vi.useRealTimers(); }); it("should return an object with signal and abortId", () => { @@ -24,10 +24,10 @@ describe("Test getTimeoutSignal", () => { expect(signal.aborted).toBe(false); - jest.advanceTimersByTime(timeoutMs - 1); + vi.advanceTimersByTime(timeoutMs - 1); expect(signal.aborted).toBe(false); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(signal.aborted).toBe(true); }); }); diff --git a/tests/unit/file/file.test.ts b/tests/unit/file/file.test.ts index 0bc7c879..d7c4570b 100644 --- a/tests/unit/file/file.test.ts +++ b/tests/unit/file/file.test.ts @@ -1,13 +1,13 @@ import fs from "fs"; import { join } from "path"; import { Readable } from "stream"; -import { toBinaryUploadRequest, Uploadable } from "../../../src/core/file/index"; +import { toBinaryUploadRequest, type Uploadable } from "../../../src/core/file/index"; describe("toBinaryUploadRequest", () => { - const TEST_FILE_PATH = join(__dirname, "test-file.txt"); + const TEST_FILE_PATH = join(__dirname, "..", "test-file.txt"); beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe("Buffer input", () => { @@ -394,48 +394,6 @@ describe("toBinaryUploadRequest", () => { "Content-Length": "21", // Should determine from file system (test file is 21 bytes) }); }); - - it("should handle Windows-style paths", async () => { - const input: Uploadable.FromPath = { - path: "C:\\Users\\test\\file.txt", - }; - - // Mock fs methods to avoid actual file system access - const mockStats = { size: 123 }; - const mockReadStream = {} as fs.ReadStream; - - const createReadStreamSpy = jest.spyOn(fs, "createReadStream").mockReturnValue(mockReadStream); - const statSpy = jest.spyOn(fs.promises, "stat").mockResolvedValue(mockStats as fs.Stats); - - const result = await toBinaryUploadRequest(input); - - expect(result.body).toBe(mockReadStream); - expect(result.headers).toEqual({ - "Content-Disposition": 'attachment; filename="file.txt"', // Should extract from Windows path - "Content-Length": "123", - }); - - // Restore mocks - createReadStreamSpy.mockRestore(); - statSpy.mockRestore(); - }); - - it("should handle file path when fs is not available", async () => { - const input: Uploadable.FromPath = { - path: TEST_FILE_PATH, - }; - - // Mock import to simulate environment without fs - const originalImport = jest.requireActual("fs"); - jest.doMock("fs", () => null); - - await expect(toBinaryUploadRequest(input)).rejects.toThrow( - "File path uploads are not supported in this environment.", - ); - - // Restore fs - jest.doMock("fs", () => originalImport); - }); }); describe("ArrayBufferView input", () => { diff --git a/tests/unit/form-data-utils/formDataWrapper.browser.test.ts b/tests/unit/form-data-utils/formDataWrapper.browser.test.ts deleted file mode 100644 index f7667618..00000000 --- a/tests/unit/form-data-utils/formDataWrapper.browser.test.ts +++ /dev/null @@ -1,378 +0,0 @@ -import { FormDataWrapper, newFormData } from "../../../src/core/form-data-utils/FormDataWrapper"; - -type FormDataRequest = ReturnType["getRequest"]>; - -async function getFormDataInfo(formRequest: FormDataRequest): Promise<{ - hasFile: boolean; - filename?: string; - contentType?: string; - serialized: string; -}> { - const request = new Request("http://localhost", { - ...formRequest, - method: "POST", - }); - const buffer = await request.arrayBuffer(); - const serialized = new TextDecoder().decode(buffer); - - const filenameMatch = serialized.match(/filename="([^"]+)"/); - const filename = filenameMatch ? filenameMatch[1] : undefined; - - const contentTypeMatch = serialized.match(/Content-Type: ([^\r\n]+)/); - const contentType = contentTypeMatch ? contentTypeMatch[1] : undefined; - - return { - hasFile: !!filename, - filename, - contentType, - serialized, - }; -} - -describe("FormDataWrapper - Browser Environment", () => { - let formData: FormDataWrapper; - - beforeEach(async () => { - formData = new FormDataWrapper(); - await formData.setup(); - }); - - describe("Web ReadableStream", () => { - it("serializes Web ReadableStream with filename", async () => { - const stream = new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode("web stream content")); - controller.close(); - }, - }); - - await formData.appendFile("file", stream, "webstream.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="webstream.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("webstream.txt"); - }); - - it("handles empty Web ReadableStream", async () => { - const stream = new ReadableStream({ - start(controller) { - controller.close(); - }, - }); - - await formData.appendFile("file", stream, "empty.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="empty.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("empty.txt"); - }); - }); - - describe("Browser-specific types", () => { - it("serializes Blob with specified filename and content type", async () => { - const blob = new Blob(["file content"], { type: "text/plain" }); - await formData.appendFile("file", blob, "testfile.txt"); - - const { serialized, hasFile, contentType, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="testfile.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("testfile.txt"); - expect(contentType).toBe("text/plain"); - }); - - it("serializes File and preserves filename", async () => { - const file = new File(["file content"], "testfile.txt", { type: "text/plain" }); - await formData.appendFile("file", file); - - const { serialized, hasFile, contentType, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="testfile.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("testfile.txt"); - expect(contentType).toBe("text/plain"); - }); - - it("allows filename override for File objects", async () => { - const file = new File(["file content"], "original.txt", { type: "text/plain" }); - await formData.appendFile("file", file, "override.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="override.txt"'); - expect(serialized).not.toContain('filename="original.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("override.txt"); - }); - }); - - describe("Binary data types", () => { - it("serializes ArrayBuffer with filename", async () => { - const arrayBuffer = new ArrayBuffer(8); - new Uint8Array(arrayBuffer).set([1, 2, 3, 4, 5, 6, 7, 8]); - - await formData.appendFile("file", arrayBuffer, "binary.bin"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="binary.bin"'); - expect(hasFile).toBe(true); - expect(filename).toBe("binary.bin"); - }); - - it("serializes Uint8Array with filename", async () => { - const uint8Array = new Uint8Array([72, 101, 108, 108, 111]); // "Hello" - await formData.appendFile("file", uint8Array, "binary.bin"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="binary.bin"'); - expect(hasFile).toBe(true); - expect(filename).toBe("binary.bin"); - }); - - it("serializes other typed arrays", async () => { - const int16Array = new Int16Array([1000, 2000, 3000]); - await formData.appendFile("file", int16Array, "numbers.bin"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="numbers.bin"'); - expect(hasFile).toBe(true); - expect(filename).toBe("numbers.bin"); - }); - }); - - describe("Text and primitive types", () => { - it("serializes string as regular form field", async () => { - formData.append("text", "test string"); - - const { serialized, hasFile } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="text"'); - expect(serialized).not.toContain("filename="); - expect(serialized).toContain("test string"); - expect(hasFile).toBe(false); - }); - - it("serializes string as file with filename", async () => { - await formData.appendFile("file", "test content", "text.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="text.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("text.txt"); - }); - - it("serializes numbers and booleans as strings", async () => { - formData.append("number", 12345); - formData.append("flag", true); - - const { serialized } = await getFormDataInfo(formData.getRequest()); - expect(serialized).toContain("12345"); - expect(serialized).toContain("true"); - }); - }); - - describe("Object and JSON handling", () => { - it("serializes objects as JSON with filename", async () => { - const obj = { test: "value", nested: { key: "data" } }; - await formData.appendFile("data", obj, "data.json"); - - const { serialized, hasFile, contentType, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="data"'); - expect(serialized).toContain('filename="data.json"'); - expect(serialized).toContain("Content-Type: application/json"); - expect(hasFile).toBe(true); - expect(filename).toBe("data.json"); - expect(contentType).toBe("application/json"); - }); - - it("serializes arrays as JSON", async () => { - const arr = [1, 2, 3, "test"]; - await formData.appendFile("array", arr, "array.json"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="array"'); - expect(serialized).toContain('filename="array.json"'); - expect(hasFile).toBe(true); - expect(filename).toBe("array.json"); - }); - - it("handles null and undefined values", async () => { - formData.append("nullValue", null); - formData.append("undefinedValue", undefined); - - const { serialized } = await getFormDataInfo(formData.getRequest()); - expect(serialized).toContain("null"); - expect(serialized).toContain("undefined"); - }); - }); - - describe("Filename extraction from objects", () => { - it("extracts filename from object with name property", async () => { - const namedValue = { name: "custom-name.txt", data: "content" }; - await formData.appendFile("file", namedValue); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="custom-name.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("custom-name.txt"); - }); - - it("extracts filename from object with path property", async () => { - const pathedValue = { path: "/some/path/file.txt", content: "data" }; - await formData.appendFile("file", pathedValue); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="file.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("file.txt"); - }); - - it("prioritizes explicit filename over object properties", async () => { - const namedValue = { name: "original.txt", data: "content" }; - await formData.appendFile("file", namedValue, "override.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="override.txt"'); - expect(serialized).not.toContain('filename="original.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("override.txt"); - }); - }); - - describe("Edge cases and error handling", () => { - it("handles empty filename gracefully", async () => { - await formData.appendFile("file", "content", ""); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('Content-Disposition: form-data; name="file"'); - expect(serialized).toContain('filename="blob"'); // Default fallback - expect(hasFile).toBe(true); - expect(filename).toBe("blob"); - }); - - it("handles large strings", async () => { - const largeString = "x".repeat(1000); - await formData.appendFile("large", largeString, "large.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="large"'); - expect(serialized).toContain('filename="large.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("large.txt"); - }); - - it("handles unicode content and filenames", async () => { - const unicodeContent = "Hello 世界 🌍 Emoji 🚀"; - const unicodeFilename = "файл-тест-🌟.txt"; - - await formData.appendFile("unicode", unicodeContent, unicodeFilename); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="unicode"'); - expect(serialized).toContain(`filename="${unicodeFilename}"`); - expect(hasFile).toBe(true); - expect(filename).toBe(unicodeFilename); - }); - - it("handles multiple files in single form", async () => { - await formData.appendFile("file1", "content1", "file1.txt"); - await formData.appendFile("file2", "content2", "file2.txt"); - formData.append("text", "regular field"); - - const { serialized } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file1"'); - expect(serialized).toContain('filename="file1.txt"'); - - expect(serialized).toContain('name="file2"'); - expect(serialized).toContain('filename="file2.txt"'); - - expect(serialized).toContain('name="text"'); - expect(serialized).not.toContain('filename="text"'); - expect(serialized).toContain("regular field"); - }); - }); - - describe("Request structure", () => { - it("returns correct request structure", async () => { - await formData.appendFile("file", "content", "test.txt"); - - const request = formData.getRequest(); - - expect(request).toHaveProperty("body"); - expect(request).toHaveProperty("headers"); - expect(request).toHaveProperty("duplex"); - expect(request.body).toBeInstanceOf(FormData); - expect(request.headers).toEqual({}); - expect(request.duplex).toBe("half"); - }); - - it("generates proper multipart boundary structure", async () => { - await formData.appendFile("file", "test content", "test.txt"); - formData.append("field", "value"); - - const { serialized } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toMatch(/------formdata-undici-\w+|------WebKitFormBoundary\w+/); - expect(serialized).toContain("Content-Disposition: form-data;"); - expect(serialized).toMatch(/------formdata-undici-\w+--|------WebKitFormBoundary\w+--/); - }); - }); - - describe("Factory function", () => { - it("returns FormDataWrapper instance", async () => { - const formData = await newFormData(); - expect(formData).toBeInstanceOf(FormDataWrapper); - }); - - it("creates independent instances", async () => { - const formData1 = await newFormData(); - const formData2 = await newFormData(); - - await formData1.setup(); - await formData2.setup(); - - formData1.append("test1", "value1"); - formData2.append("test2", "value2"); - - const request1 = formData1.getRequest() as { body: FormData }; - const request2 = formData2.getRequest() as { body: FormData }; - - const entries1 = Array.from(request1.body.entries()); - const entries2 = Array.from(request2.body.entries()); - - expect(entries1).toHaveLength(1); - expect(entries2).toHaveLength(1); - expect(entries1[0][0]).toBe("test1"); - expect(entries2[0][0]).toBe("test2"); - }); - }); -}); diff --git a/tests/unit/form-data-utils/formDataWrapper.test.ts b/tests/unit/form-data-utils/formDataWrapper.test.ts index 0ec0bcae..47705084 100644 --- a/tests/unit/form-data-utils/formDataWrapper.test.ts +++ b/tests/unit/form-data-utils/formDataWrapper.test.ts @@ -1,7 +1,8 @@ +import { Blob, File } from "buffer"; +import { join } from "path"; /* eslint-disable @typescript-eslint/ban-ts-comment */ import { Readable } from "stream"; import { FormDataWrapper, newFormData } from "../../../src/core/form-data-utils/FormDataWrapper"; -import { File, Blob } from "buffer"; // Helper function to serialize FormData to string for inspection async function serializeFormData(formData: FormData): Promise { @@ -22,10 +23,38 @@ describe("FormDataWrapper", () => { await formData.setup(); }); + it("Upload file by path", async () => { + await formData.appendFile("file", { + path: join(__dirname, "..", "test-file.txt"), + }); + + const serialized = await serializeFormData(formData.getRequest().body); + + expect(serialized).toContain('Content-Disposition: form-data; name="file"'); + expect(serialized).toContain('filename="test-file.txt"'); + expect(serialized).toContain("This is a test file!"); + }); + + it("Upload file by path with filename", async () => { + await formData.appendFile("file", { + path: join(__dirname, "..", "test-file.txt"), + filename: "custom-file.txt", + }); + + const serialized = await serializeFormData(formData.getRequest().body); + + expect(serialized).toContain('Content-Disposition: form-data; name="file"'); + expect(serialized).toContain('filename="custom-file.txt"'); + expect(serialized).toContain("This is a test file!"); + }); + describe("Stream handling", () => { it("serializes Node.js Readable stream with filename", async () => { const stream = Readable.from(["file content"]); - await formData.appendFile("file", stream, "testfile.txt"); + await formData.appendFile("file", { + data: stream, + filename: "testfile.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); @@ -56,7 +85,10 @@ describe("FormDataWrapper", () => { it("handles empty streams", async () => { const stream = Readable.from([]); - await formData.appendFile("file", stream, "empty.txt"); + await formData.appendFile("file", { + data: stream, + filename: "empty.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="empty.txt"'); @@ -71,7 +103,10 @@ describe("FormDataWrapper", () => { }, }); - await formData.appendFile("file", stream, "webstream.txt"); + await formData.appendFile("file", { + data: stream, + filename: "webstream.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="webstream.txt"'); @@ -85,7 +120,10 @@ describe("FormDataWrapper", () => { }, }); - await formData.appendFile("file", stream, "empty.txt"); + await formData.appendFile("file", { + data: stream, + filename: "empty.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="empty.txt"'); @@ -96,7 +134,10 @@ describe("FormDataWrapper", () => { describe("Blob and File types", () => { it("serializes Blob with specified filename", async () => { const blob = new Blob(["file content"], { type: "text/plain" }); - await formData.appendFile("file", blob, "testfile.txt"); + await formData.appendFile("file", { + data: blob, + filename: "testfile.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="testfile.txt"'); @@ -126,7 +167,10 @@ describe("FormDataWrapper", () => { it("allows filename override for File objects", async () => { if (typeof File !== "undefined") { const file = new File(["file content"], "original.txt", { type: "text/plain" }); - await formData.appendFile("file", file, "override.txt"); + await formData.appendFile("file", { + data: file, + filename: "override.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="override.txt"'); @@ -140,7 +184,10 @@ describe("FormDataWrapper", () => { const arrayBuffer = new ArrayBuffer(8); new Uint8Array(arrayBuffer).set([1, 2, 3, 4, 5, 6, 7, 8]); - await formData.appendFile("file", arrayBuffer, "binary.bin"); + await formData.appendFile("file", { + data: arrayBuffer, + filename: "binary.bin", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="binary.bin"'); @@ -149,7 +196,10 @@ describe("FormDataWrapper", () => { it("serializes Uint8Array with filename", async () => { const uint8Array = new Uint8Array([72, 101, 108, 108, 111]); // "Hello" - await formData.appendFile("file", uint8Array, "binary.bin"); + await formData.appendFile("file", { + data: uint8Array, + filename: "binary.bin", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="binary.bin"'); @@ -158,7 +208,10 @@ describe("FormDataWrapper", () => { it("serializes other typed arrays", async () => { const int16Array = new Int16Array([1000, 2000, 3000]); - await formData.appendFile("file", int16Array, "numbers.bin"); + await formData.appendFile("file", { + data: int16Array, + filename: "numbers.bin", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="numbers.bin"'); @@ -167,7 +220,10 @@ describe("FormDataWrapper", () => { it("serializes Buffer data with filename", async () => { if (typeof Buffer !== "undefined" && typeof Buffer.isBuffer === "function") { const buffer = Buffer.from("test content"); - await formData.appendFile("file", buffer, "test.txt"); + await formData.appendFile("file", { + data: buffer, + filename: "test.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="test.txt"'); @@ -186,14 +242,6 @@ describe("FormDataWrapper", () => { expect(serialized).toContain("test string"); }); - it("serializes string as file with filename", async () => { - await formData.appendFile("file", "test content", "text.txt"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="text.txt"'); - expect(serialized).toContain("test content"); - }); - it("serializes numbers and booleans as strings", async () => { formData.append("number", 12345); formData.append("flag", true); @@ -204,94 +252,26 @@ describe("FormDataWrapper", () => { }); }); - describe("Object and JSON handling", () => { - it("serializes objects as JSON with filename", async () => { - const obj = { test: "value", nested: { key: "data" } }; - await formData.appendFile("data", obj, "data.json"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="data.json"'); - expect(serialized).toContain("Content-Type: application/json"); - expect(serialized).toContain(JSON.stringify(obj)); - }); - - it("serializes arrays as JSON", async () => { - const arr = [1, 2, 3, "test"]; - await formData.appendFile("array", arr, "array.json"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="array.json"'); - expect(serialized).toContain(JSON.stringify(arr)); - }); - - it("handles null and undefined values", async () => { - formData.append("nullValue", null); - formData.append("undefinedValue", undefined); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain("null"); - expect(serialized).toContain("undefined"); - }); - }); - - describe("Filename extraction from objects", () => { - it("extracts filename from object with name property", async () => { - const namedValue = { name: "custom-name.txt", data: "content" }; - await formData.appendFile("file", namedValue); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="custom-name.txt"'); - expect(serialized).toContain(JSON.stringify(namedValue)); - }); - - it("extracts filename from object with path property", async () => { - const pathedValue = { path: "/some/path/file.txt", content: "data" }; - await formData.appendFile("file", pathedValue); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="file.txt"'); - }); - - it("prioritizes explicit filename over object properties", async () => { - const namedValue = { name: "original.txt", data: "content" }; - await formData.appendFile("file", namedValue, "override.txt"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="override.txt"'); - expect(serialized).not.toContain('filename="original.txt"'); - }); - }); - describe("Edge cases and error handling", () => { it("handles empty filename gracefully", async () => { - await formData.appendFile("file", "content", ""); + await formData.appendFile("file", { + data: new Blob(["content"], { type: "text/plain" }), + filename: "", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="blob"'); // Default fallback }); - it("handles large strings", async () => { - const largeString = "x".repeat(1000); - await formData.appendFile("large", largeString, "large.txt"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="large.txt"'); - }); - - it("handles unicode content and filenames", async () => { - const unicodeContent = "Hello 世界 🌍 Emoji 🚀"; - const unicodeFilename = "файл-тест-🌟.txt"; - - await formData.appendFile("unicode", unicodeContent, unicodeFilename); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="' + unicodeFilename + '"'); - expect(serialized).toContain(unicodeContent); - }); - it("handles multiple files in single form", async () => { - await formData.appendFile("file1", "content1", "file1.txt"); - await formData.appendFile("file2", "content2", "file2.txt"); + await formData.appendFile("file1", { + data: new Blob(["content1"], { type: "text/plain" }), + filename: "file1.txt", + }); + await formData.appendFile("file2", { + data: new Blob(["content2"], { type: "text/plain" }), + filename: "file2.txt", + }); formData.append("text", "regular field"); const serialized = await serializeFormData(formData.getRequest().body); @@ -305,7 +285,10 @@ describe("FormDataWrapper", () => { describe("Request structure", () => { it("returns correct request structure", async () => { - await formData.appendFile("file", "content", "test.txt"); + await formData.appendFile("file", { + data: new Blob(["content"], { type: "text/plain" }), + filename: "test.txt", + }); const request = formData.getRequest(); @@ -318,7 +301,10 @@ describe("FormDataWrapper", () => { }); it("generates proper multipart boundary structure", async () => { - await formData.appendFile("file", "test content", "test.txt"); + await formData.appendFile("file", { + data: new Blob(["test content"], { type: "text/plain" }), + filename: "test.txt", + }); formData.append("field", "value"); const serialized = await serializeFormData(formData.getRequest().body); diff --git a/tests/unit/logging/logger.test.ts b/tests/unit/logging/logger.test.ts new file mode 100644 index 00000000..2e0b5fe5 --- /dev/null +++ b/tests/unit/logging/logger.test.ts @@ -0,0 +1,454 @@ +import { ConsoleLogger, createLogger, Logger, LogLevel } from "../../../src/core/logging/logger"; + +function createMockLogger() { + return { + debug: vi.fn(), + info: vi.fn(), + warn: vi.fn(), + error: vi.fn(), + }; +} + +describe("Logger", () => { + describe("LogLevel", () => { + it("should have correct log levels", () => { + expect(LogLevel.Debug).toBe("debug"); + expect(LogLevel.Info).toBe("info"); + expect(LogLevel.Warn).toBe("warn"); + expect(LogLevel.Error).toBe("error"); + }); + }); + + describe("ConsoleLogger", () => { + let consoleLogger: ConsoleLogger; + let consoleSpy: { + debug: ReturnType; + info: ReturnType; + warn: ReturnType; + error: ReturnType; + }; + + beforeEach(() => { + consoleLogger = new ConsoleLogger(); + consoleSpy = { + debug: vi.spyOn(console, "debug").mockImplementation(() => {}), + info: vi.spyOn(console, "info").mockImplementation(() => {}), + warn: vi.spyOn(console, "warn").mockImplementation(() => {}), + error: vi.spyOn(console, "error").mockImplementation(() => {}), + }; + }); + + afterEach(() => { + consoleSpy.debug.mockRestore(); + consoleSpy.info.mockRestore(); + consoleSpy.warn.mockRestore(); + consoleSpy.error.mockRestore(); + }); + + it("should log debug messages", () => { + consoleLogger.debug("debug message", { data: "test" }); + expect(consoleSpy.debug).toHaveBeenCalledWith("debug message", { data: "test" }); + }); + + it("should log info messages", () => { + consoleLogger.info("info message", { data: "test" }); + expect(consoleSpy.info).toHaveBeenCalledWith("info message", { data: "test" }); + }); + + it("should log warn messages", () => { + consoleLogger.warn("warn message", { data: "test" }); + expect(consoleSpy.warn).toHaveBeenCalledWith("warn message", { data: "test" }); + }); + + it("should log error messages", () => { + consoleLogger.error("error message", { data: "test" }); + expect(consoleSpy.error).toHaveBeenCalledWith("error message", { data: "test" }); + }); + + it("should handle multiple arguments", () => { + consoleLogger.debug("message", "arg1", "arg2", { key: "value" }); + expect(consoleSpy.debug).toHaveBeenCalledWith("message", "arg1", "arg2", { key: "value" }); + }); + }); + + describe("Logger with level filtering", () => { + let mockLogger: { + debug: ReturnType; + info: ReturnType; + warn: ReturnType; + error: ReturnType; + }; + + beforeEach(() => { + mockLogger = createMockLogger(); + }); + + describe("Debug level", () => { + it("should log all levels when set to debug", () => { + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: false, + }); + + logger.debug("debug"); + logger.info("info"); + logger.warn("warn"); + logger.error("error"); + + expect(mockLogger.debug).toHaveBeenCalledWith("debug"); + expect(mockLogger.info).toHaveBeenCalledWith("info"); + expect(mockLogger.warn).toHaveBeenCalledWith("warn"); + expect(mockLogger.error).toHaveBeenCalledWith("error"); + }); + + it("should report correct level checks", () => { + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: false, + }); + + expect(logger.isDebug()).toBe(true); + expect(logger.isInfo()).toBe(true); + expect(logger.isWarn()).toBe(true); + expect(logger.isError()).toBe(true); + }); + }); + + describe("Info level", () => { + it("should log info, warn, and error when set to info", () => { + const logger = new Logger({ + level: LogLevel.Info, + logger: mockLogger, + silent: false, + }); + + logger.debug("debug"); + logger.info("info"); + logger.warn("warn"); + logger.error("error"); + + expect(mockLogger.debug).not.toHaveBeenCalled(); + expect(mockLogger.info).toHaveBeenCalledWith("info"); + expect(mockLogger.warn).toHaveBeenCalledWith("warn"); + expect(mockLogger.error).toHaveBeenCalledWith("error"); + }); + + it("should report correct level checks", () => { + const logger = new Logger({ + level: LogLevel.Info, + logger: mockLogger, + silent: false, + }); + + expect(logger.isDebug()).toBe(false); + expect(logger.isInfo()).toBe(true); + expect(logger.isWarn()).toBe(true); + expect(logger.isError()).toBe(true); + }); + }); + + describe("Warn level", () => { + it("should log warn and error when set to warn", () => { + const logger = new Logger({ + level: LogLevel.Warn, + logger: mockLogger, + silent: false, + }); + + logger.debug("debug"); + logger.info("info"); + logger.warn("warn"); + logger.error("error"); + + expect(mockLogger.debug).not.toHaveBeenCalled(); + expect(mockLogger.info).not.toHaveBeenCalled(); + expect(mockLogger.warn).toHaveBeenCalledWith("warn"); + expect(mockLogger.error).toHaveBeenCalledWith("error"); + }); + + it("should report correct level checks", () => { + const logger = new Logger({ + level: LogLevel.Warn, + logger: mockLogger, + silent: false, + }); + + expect(logger.isDebug()).toBe(false); + expect(logger.isInfo()).toBe(false); + expect(logger.isWarn()).toBe(true); + expect(logger.isError()).toBe(true); + }); + }); + + describe("Error level", () => { + it("should only log error when set to error", () => { + const logger = new Logger({ + level: LogLevel.Error, + logger: mockLogger, + silent: false, + }); + + logger.debug("debug"); + logger.info("info"); + logger.warn("warn"); + logger.error("error"); + + expect(mockLogger.debug).not.toHaveBeenCalled(); + expect(mockLogger.info).not.toHaveBeenCalled(); + expect(mockLogger.warn).not.toHaveBeenCalled(); + expect(mockLogger.error).toHaveBeenCalledWith("error"); + }); + + it("should report correct level checks", () => { + const logger = new Logger({ + level: LogLevel.Error, + logger: mockLogger, + silent: false, + }); + + expect(logger.isDebug()).toBe(false); + expect(logger.isInfo()).toBe(false); + expect(logger.isWarn()).toBe(false); + expect(logger.isError()).toBe(true); + }); + }); + + describe("Silent mode", () => { + it("should not log anything when silent is true", () => { + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: true, + }); + + logger.debug("debug"); + logger.info("info"); + logger.warn("warn"); + logger.error("error"); + + expect(mockLogger.debug).not.toHaveBeenCalled(); + expect(mockLogger.info).not.toHaveBeenCalled(); + expect(mockLogger.warn).not.toHaveBeenCalled(); + expect(mockLogger.error).not.toHaveBeenCalled(); + }); + + it("should report all level checks as false when silent", () => { + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: true, + }); + + expect(logger.isDebug()).toBe(false); + expect(logger.isInfo()).toBe(false); + expect(logger.isWarn()).toBe(false); + expect(logger.isError()).toBe(false); + }); + }); + + describe("shouldLog", () => { + it("should correctly determine if level should be logged", () => { + const logger = new Logger({ + level: LogLevel.Info, + logger: mockLogger, + silent: false, + }); + + expect(logger.shouldLog(LogLevel.Debug)).toBe(false); + expect(logger.shouldLog(LogLevel.Info)).toBe(true); + expect(logger.shouldLog(LogLevel.Warn)).toBe(true); + expect(logger.shouldLog(LogLevel.Error)).toBe(true); + }); + + it("should return false for all levels when silent", () => { + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: true, + }); + + expect(logger.shouldLog(LogLevel.Debug)).toBe(false); + expect(logger.shouldLog(LogLevel.Info)).toBe(false); + expect(logger.shouldLog(LogLevel.Warn)).toBe(false); + expect(logger.shouldLog(LogLevel.Error)).toBe(false); + }); + }); + + describe("Multiple arguments", () => { + it("should pass multiple arguments to logger", () => { + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: false, + }); + + logger.debug("message", "arg1", { key: "value" }, 123); + expect(mockLogger.debug).toHaveBeenCalledWith("message", "arg1", { key: "value" }, 123); + }); + }); + }); + + describe("createLogger", () => { + it("should return default logger when no config provided", () => { + const logger = createLogger(); + expect(logger).toBeInstanceOf(Logger); + }); + + it("should return same logger instance when Logger is passed", () => { + const customLogger = new Logger({ + level: LogLevel.Debug, + logger: new ConsoleLogger(), + silent: false, + }); + + const result = createLogger(customLogger); + expect(result).toBe(customLogger); + }); + + it("should create logger with custom config", () => { + const mockLogger = createMockLogger(); + + const logger = createLogger({ + level: LogLevel.Warn, + logger: mockLogger, + silent: false, + }); + + expect(logger).toBeInstanceOf(Logger); + logger.warn("test"); + expect(mockLogger.warn).toHaveBeenCalledWith("test"); + }); + + it("should use default values for missing config", () => { + const logger = createLogger({}); + expect(logger).toBeInstanceOf(Logger); + }); + + it("should override default level", () => { + const mockLogger = createMockLogger(); + + const logger = createLogger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: false, + }); + + logger.debug("test"); + expect(mockLogger.debug).toHaveBeenCalledWith("test"); + }); + + it("should override default silent mode", () => { + const mockLogger = createMockLogger(); + + const logger = createLogger({ + logger: mockLogger, + silent: false, + }); + + logger.info("test"); + expect(mockLogger.info).toHaveBeenCalledWith("test"); + }); + + it("should use provided logger implementation", () => { + const customLogger = createMockLogger(); + + const logger = createLogger({ + logger: customLogger, + level: LogLevel.Debug, + silent: false, + }); + + logger.debug("test"); + expect(customLogger.debug).toHaveBeenCalledWith("test"); + }); + + it("should default to silent: true", () => { + const mockLogger = createMockLogger(); + + const logger = createLogger({ + logger: mockLogger, + level: LogLevel.Debug, + }); + + logger.debug("test"); + expect(mockLogger.debug).not.toHaveBeenCalled(); + }); + }); + + describe("Default logger", () => { + it("should have silent: true by default", () => { + const logger = createLogger(); + expect(logger.shouldLog(LogLevel.Info)).toBe(false); + }); + + it("should not log when using default logger", () => { + const logger = createLogger(); + + logger.info("test"); + expect(logger.isInfo()).toBe(false); + }); + }); + + describe("Edge cases", () => { + it("should handle empty message", () => { + const mockLogger = createMockLogger(); + + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: false, + }); + + logger.debug(""); + expect(mockLogger.debug).toHaveBeenCalledWith(""); + }); + + it("should handle no arguments", () => { + const mockLogger = createMockLogger(); + + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: false, + }); + + logger.debug("message"); + expect(mockLogger.debug).toHaveBeenCalledWith("message"); + }); + + it("should handle complex objects", () => { + const mockLogger = createMockLogger(); + + const logger = new Logger({ + level: LogLevel.Debug, + logger: mockLogger, + silent: false, + }); + + const complexObject = { + nested: { key: "value" }, + array: [1, 2, 3], + fn: () => "test", + }; + + logger.debug("message", complexObject); + expect(mockLogger.debug).toHaveBeenCalledWith("message", complexObject); + }); + + it("should handle errors as arguments", () => { + const mockLogger = createMockLogger(); + + const logger = new Logger({ + level: LogLevel.Error, + logger: mockLogger, + silent: false, + }); + + const error = new Error("Test error"); + logger.error("Error occurred", error); + expect(mockLogger.error).toHaveBeenCalledWith("Error occurred", error); + }); + }); +}); diff --git a/tests/unit/file/test-file.txt b/tests/unit/test-file.txt similarity index 100% rename from tests/unit/file/test-file.txt rename to tests/unit/test-file.txt diff --git a/tests/unit/url/join.test.ts b/tests/unit/url/join.test.ts index 984cfe67..123488f0 100644 --- a/tests/unit/url/join.test.ts +++ b/tests/unit/url/join.test.ts @@ -1,88 +1,223 @@ import { join } from "../../../src/core/url/index"; describe("join", () => { - describe("basic functionality", () => { - it("should return empty string for empty base", () => { - expect(join("")).toBe(""); - expect(join("", "path")).toBe(""); - }); + interface TestCase { + description: string; + base: string; + segments: string[]; + expected: string; + } - it("should handle single segment", () => { - expect(join("base", "segment")).toBe("base/segment"); - expect(join("base/", "segment")).toBe("base/segment"); - expect(join("base", "/segment")).toBe("base/segment"); - expect(join("base/", "/segment")).toBe("base/segment"); - }); + describe("basic functionality", () => { + const basicTests: TestCase[] = [ + { description: "should return empty string for empty base", base: "", segments: [], expected: "" }, + { + description: "should return empty string for empty base with path", + base: "", + segments: ["path"], + expected: "", + }, + { + description: "should handle single segment", + base: "base", + segments: ["segment"], + expected: "base/segment", + }, + { + description: "should handle single segment with trailing slash on base", + base: "base/", + segments: ["segment"], + expected: "base/segment", + }, + { + description: "should handle single segment with leading slash", + base: "base", + segments: ["/segment"], + expected: "base/segment", + }, + { + description: "should handle single segment with both slashes", + base: "base/", + segments: ["/segment"], + expected: "base/segment", + }, + { + description: "should handle multiple segments", + base: "base", + segments: ["path1", "path2", "path3"], + expected: "base/path1/path2/path3", + }, + { + description: "should handle multiple segments with slashes", + base: "base/", + segments: ["/path1/", "/path2/", "/path3/"], + expected: "base/path1/path2/path3/", + }, + ]; - it("should handle multiple segments", () => { - expect(join("base", "path1", "path2", "path3")).toBe("base/path1/path2/path3"); - expect(join("base/", "/path1/", "/path2/", "/path3/")).toBe("base/path1/path2/path3/"); + basicTests.forEach(({ description, base, segments, expected }) => { + it(description, () => { + expect(join(base, ...segments)).toBe(expected); + }); }); }); describe("URL handling", () => { - it("should handle absolute URLs", () => { - expect(join("https://example.com", "api", "v1")).toBe("https://example.com/api/v1"); - expect(join("https://example.com/", "/api/", "/v1/")).toBe("https://example.com/api/v1/"); - expect(join("https://example.com/base", "api", "v1")).toBe("https://example.com/base/api/v1"); - }); + const urlTests: TestCase[] = [ + { + description: "should handle absolute URLs", + base: "https://example.com", + segments: ["api", "v1"], + expected: "https://example.com/api/v1", + }, + { + description: "should handle absolute URLs with slashes", + base: "https://example.com/", + segments: ["/api/", "/v1/"], + expected: "https://example.com/api/v1/", + }, + { + description: "should handle absolute URLs with base path", + base: "https://example.com/base", + segments: ["api", "v1"], + expected: "https://example.com/base/api/v1", + }, + { + description: "should preserve URL query parameters", + base: "https://example.com?query=1", + segments: ["api"], + expected: "https://example.com/api?query=1", + }, + { + description: "should preserve URL fragments", + base: "https://example.com#fragment", + segments: ["api"], + expected: "https://example.com/api#fragment", + }, + { + description: "should preserve URL query and fragments", + base: "https://example.com?query=1#fragment", + segments: ["api"], + expected: "https://example.com/api?query=1#fragment", + }, + { + description: "should handle http protocol", + base: "http://example.com", + segments: ["api"], + expected: "http://example.com/api", + }, + { + description: "should handle ftp protocol", + base: "ftp://example.com", + segments: ["files"], + expected: "ftp://example.com/files", + }, + { + description: "should handle ws protocol", + base: "ws://example.com", + segments: ["socket"], + expected: "ws://example.com/socket", + }, + { + description: "should fallback to path joining for malformed URLs", + base: "not-a-url://", + segments: ["path"], + expected: "not-a-url:///path", + }, + ]; - it("should preserve URL query parameters and fragments", () => { - expect(join("https://example.com?query=1", "api")).toBe("https://example.com/api?query=1"); - expect(join("https://example.com#fragment", "api")).toBe("https://example.com/api#fragment"); - expect(join("https://example.com?query=1#fragment", "api")).toBe( - "https://example.com/api?query=1#fragment", - ); - }); - - it("should handle different protocols", () => { - expect(join("http://example.com", "api")).toBe("http://example.com/api"); - expect(join("ftp://example.com", "files")).toBe("ftp://example.com/files"); - expect(join("ws://example.com", "socket")).toBe("ws://example.com/socket"); - }); - - it("should fallback to path joining for malformed URLs", () => { - expect(join("not-a-url://", "path")).toBe("not-a-url:///path"); + urlTests.forEach(({ description, base, segments, expected }) => { + it(description, () => { + expect(join(base, ...segments)).toBe(expected); + }); }); }); describe("edge cases", () => { - it("should handle empty segments", () => { - expect(join("base", "", "path")).toBe("base/path"); - expect(join("base", null as any, "path")).toBe("base/path"); - expect(join("base", undefined as any, "path")).toBe("base/path"); - }); - - it("should handle segments with only slashes", () => { - expect(join("base", "/", "path")).toBe("base/path"); - expect(join("base", "//", "path")).toBe("base/path"); - }); - - it("should handle base paths with trailing slashes", () => { - expect(join("base/", "path")).toBe("base/path"); - }); + const edgeCaseTests: TestCase[] = [ + { + description: "should handle empty segments", + base: "base", + segments: ["", "path"], + expected: "base/path", + }, + { + description: "should handle null segments", + base: "base", + segments: [null as any, "path"], + expected: "base/path", + }, + { + description: "should handle undefined segments", + base: "base", + segments: [undefined as any, "path"], + expected: "base/path", + }, + { + description: "should handle segments with only single slash", + base: "base", + segments: ["/", "path"], + expected: "base/path", + }, + { + description: "should handle segments with only double slash", + base: "base", + segments: ["//", "path"], + expected: "base/path", + }, + { + description: "should handle base paths with trailing slashes", + base: "base/", + segments: ["path"], + expected: "base/path", + }, + { + description: "should handle complex nested paths", + base: "api/v1/", + segments: ["/users/", "/123/", "/profile"], + expected: "api/v1/users/123/profile", + }, + ]; - it("should handle complex nested paths", () => { - expect(join("api/v1/", "/users/", "/123/", "/profile")).toBe("api/v1/users/123/profile"); + edgeCaseTests.forEach(({ description, base, segments, expected }) => { + it(description, () => { + expect(join(base, ...segments)).toBe(expected); + }); }); }); describe("real-world scenarios", () => { - it("should handle API endpoint construction", () => { - const baseUrl = "https://api.example.com/v1"; - expect(join(baseUrl, "users", "123", "posts")).toBe("https://api.example.com/v1/users/123/posts"); - }); - - it("should handle file path construction", () => { - expect(join("/var/www", "html", "assets", "images")).toBe("/var/www/html/assets/images"); - }); + const realWorldTests: TestCase[] = [ + { + description: "should handle API endpoint construction", + base: "https://api.example.com/v1", + segments: ["users", "123", "posts"], + expected: "https://api.example.com/v1/users/123/posts", + }, + { + description: "should handle file path construction", + base: "/var/www", + segments: ["html", "assets", "images"], + expected: "/var/www/html/assets/images", + }, + { + description: "should handle relative path construction", + base: "../parent", + segments: ["child", "grandchild"], + expected: "../parent/child/grandchild", + }, + { + description: "should handle Windows-style paths", + base: "C:\\Users", + segments: ["Documents", "file.txt"], + expected: "C:\\Users/Documents/file.txt", + }, + ]; - it("should handle relative path construction", () => { - expect(join("../parent", "child", "grandchild")).toBe("../parent/child/grandchild"); - }); - - it("should handle Windows-style paths", () => { - expect(join("C:\\Users", "Documents", "file.txt")).toBe("C:\\Users/Documents/file.txt"); + realWorldTests.forEach(({ description, base, segments, expected }) => { + it(description, () => { + expect(join(base, ...segments)).toBe(expected); + }); }); }); @@ -90,7 +225,7 @@ describe("join", () => { it("should handle many segments efficiently", () => { const segments = Array(100).fill("segment"); const result = join("base", ...segments); - expect(result).toBe("base/" + segments.join("/")); + expect(result).toBe(`base/${segments.join("/")}`); }); it("should handle long URLs", () => { @@ -100,21 +235,50 @@ describe("join", () => { }); describe("trailing slash preservation", () => { - it("should preserve trailing slash on final result when base has trailing slash and no segments", () => { - expect(join("https://api.example.com/")).toBe("https://api.example.com/"); - expect(join("https://api.example.com/v1/")).toBe("https://api.example.com/v1/"); - }); - - it("should preserve trailing slash when last segment has trailing slash", () => { - expect(join("https://api.example.com", "users/")).toBe("https://api.example.com/users/"); - expect(join("api/v1", "users/")).toBe("api/v1/users/"); - }); + const trailingSlashTests: TestCase[] = [ + { + description: + "should preserve trailing slash on final result when base has trailing slash and no segments", + base: "https://api.example.com/", + segments: [], + expected: "https://api.example.com/", + }, + { + description: "should preserve trailing slash on v1 path", + base: "https://api.example.com/v1/", + segments: [], + expected: "https://api.example.com/v1/", + }, + { + description: "should preserve trailing slash when last segment has trailing slash", + base: "https://api.example.com", + segments: ["users/"], + expected: "https://api.example.com/users/", + }, + { + description: "should preserve trailing slash with relative path", + base: "api/v1", + segments: ["users/"], + expected: "api/v1/users/", + }, + { + description: "should preserve trailing slash with multiple segments", + base: "https://api.example.com", + segments: ["v1", "collections/"], + expected: "https://api.example.com/v1/collections/", + }, + { + description: "should preserve trailing slash with base path", + base: "base", + segments: ["path1", "path2/"], + expected: "base/path1/path2/", + }, + ]; - it("should preserve trailing slash with multiple segments where last has trailing slash", () => { - expect(join("https://api.example.com", "v1", "collections/")).toBe( - "https://api.example.com/v1/collections/", - ); - expect(join("base", "path1", "path2/")).toBe("base/path1/path2/"); + trailingSlashTests.forEach(({ description, base, segments, expected }) => { + it(description, () => { + expect(join(base, ...segments)).toBe(expected); + }); }); }); }); diff --git a/tests/unit/url/qs.test.ts b/tests/unit/url/qs.test.ts index 80e7e044..42cdffb9 100644 --- a/tests/unit/url/qs.test.ts +++ b/tests/unit/url/qs.test.ts @@ -1,187 +1,278 @@ import { toQueryString } from "../../../src/core/url/index"; describe("Test qs toQueryString", () => { - describe("Basic functionality", () => { - it("should return empty string for null/undefined", () => { - expect(toQueryString(null)).toBe(""); - expect(toQueryString(undefined)).toBe(""); - }); + interface BasicTestCase { + description: string; + input: any; + expected: string; + } - it("should return empty string for primitive values", () => { - expect(toQueryString("hello")).toBe(""); - expect(toQueryString(42)).toBe(""); - expect(toQueryString(true)).toBe(""); - expect(toQueryString(false)).toBe(""); - }); - - it("should handle empty objects", () => { - expect(toQueryString({})).toBe(""); - }); + describe("Basic functionality", () => { + const basicTests: BasicTestCase[] = [ + { description: "should return empty string for null", input: null, expected: "" }, + { description: "should return empty string for undefined", input: undefined, expected: "" }, + { description: "should return empty string for string primitive", input: "hello", expected: "" }, + { description: "should return empty string for number primitive", input: 42, expected: "" }, + { description: "should return empty string for true boolean", input: true, expected: "" }, + { description: "should return empty string for false boolean", input: false, expected: "" }, + { description: "should handle empty objects", input: {}, expected: "" }, + { + description: "should handle simple key-value pairs", + input: { name: "John", age: 30 }, + expected: "name=John&age=30", + }, + ]; - it("should handle simple key-value pairs", () => { - const obj = { name: "John", age: 30 }; - expect(toQueryString(obj)).toBe("name=John&age=30"); + basicTests.forEach(({ description, input, expected }) => { + it(description, () => { + expect(toQueryString(input)).toBe(expected); + }); }); }); describe("Array handling", () => { - it("should handle arrays with indices format (default)", () => { - const obj = { items: ["a", "b", "c"] }; - expect(toQueryString(obj)).toBe("items%5B0%5D=a&items%5B1%5D=b&items%5B2%5D=c"); - }); - - it("should handle arrays with repeat format", () => { - const obj = { items: ["a", "b", "c"] }; - expect(toQueryString(obj, { arrayFormat: "repeat" })).toBe("items=a&items=b&items=c"); - }); + interface ArrayTestCase { + description: string; + input: any; + options?: { arrayFormat?: "repeat" | "indices" }; + expected: string; + } - it("should handle empty arrays", () => { - const obj = { items: [] }; - expect(toQueryString(obj)).toBe(""); - }); - - it("should handle arrays with mixed types", () => { - const obj = { mixed: ["string", 42, true, false] }; - expect(toQueryString(obj)).toBe("mixed%5B0%5D=string&mixed%5B1%5D=42&mixed%5B2%5D=true&mixed%5B3%5D=false"); - }); - - it("should handle arrays with objects", () => { - const obj = { users: [{ name: "John" }, { name: "Jane" }] }; - expect(toQueryString(obj)).toBe("users%5B0%5D%5Bname%5D=John&users%5B1%5D%5Bname%5D=Jane"); - }); + const arrayTests: ArrayTestCase[] = [ + { + description: "should handle arrays with indices format (default)", + input: { items: ["a", "b", "c"] }, + expected: "items%5B0%5D=a&items%5B1%5D=b&items%5B2%5D=c", + }, + { + description: "should handle arrays with repeat format", + input: { items: ["a", "b", "c"] }, + options: { arrayFormat: "repeat" }, + expected: "items=a&items=b&items=c", + }, + { + description: "should handle empty arrays", + input: { items: [] }, + expected: "", + }, + { + description: "should handle arrays with mixed types", + input: { mixed: ["string", 42, true, false] }, + expected: "mixed%5B0%5D=string&mixed%5B1%5D=42&mixed%5B2%5D=true&mixed%5B3%5D=false", + }, + { + description: "should handle arrays with objects", + input: { users: [{ name: "John" }, { name: "Jane" }] }, + expected: "users%5B0%5D%5Bname%5D=John&users%5B1%5D%5Bname%5D=Jane", + }, + { + description: "should handle arrays with objects in repeat format", + input: { users: [{ name: "John" }, { name: "Jane" }] }, + options: { arrayFormat: "repeat" }, + expected: "users%5Bname%5D=John&users%5Bname%5D=Jane", + }, + ]; - it("should handle arrays with objects in repeat format", () => { - const obj = { users: [{ name: "John" }, { name: "Jane" }] }; - expect(toQueryString(obj, { arrayFormat: "repeat" })).toBe("users%5Bname%5D=John&users%5Bname%5D=Jane"); + arrayTests.forEach(({ description, input, options, expected }) => { + it(description, () => { + expect(toQueryString(input, options)).toBe(expected); + }); }); }); describe("Nested objects", () => { - it("should handle nested objects", () => { - const obj = { user: { name: "John", age: 30 } }; - expect(toQueryString(obj)).toBe("user%5Bname%5D=John&user%5Bage%5D=30"); - }); - - it("should handle deeply nested objects", () => { - const obj = { user: { profile: { name: "John", settings: { theme: "dark" } } } }; - expect(toQueryString(obj)).toBe( - "user%5Bprofile%5D%5Bname%5D=John&user%5Bprofile%5D%5Bsettings%5D%5Btheme%5D=dark", - ); - }); + const nestedTests: BasicTestCase[] = [ + { + description: "should handle nested objects", + input: { user: { name: "John", age: 30 } }, + expected: "user%5Bname%5D=John&user%5Bage%5D=30", + }, + { + description: "should handle deeply nested objects", + input: { user: { profile: { name: "John", settings: { theme: "dark" } } } }, + expected: "user%5Bprofile%5D%5Bname%5D=John&user%5Bprofile%5D%5Bsettings%5D%5Btheme%5D=dark", + }, + { + description: "should handle empty nested objects", + input: { user: {} }, + expected: "", + }, + ]; - it("should handle empty nested objects", () => { - const obj = { user: {} }; - expect(toQueryString(obj)).toBe(""); + nestedTests.forEach(({ description, input, expected }) => { + it(description, () => { + expect(toQueryString(input)).toBe(expected); + }); }); }); describe("Encoding", () => { - it("should encode by default", () => { - const obj = { name: "John Doe", email: "john@example.com" }; - expect(toQueryString(obj)).toBe("name=John%20Doe&email=john%40example.com"); - }); + interface EncodingTestCase { + description: string; + input: any; + options?: { encode?: boolean }; + expected: string; + } - it("should not encode when encode is false", () => { - const obj = { name: "John Doe", email: "john@example.com" }; - expect(toQueryString(obj, { encode: false })).toBe("name=John Doe&email=john@example.com"); - }); - - it("should encode special characters in keys", () => { - const obj = { "user name": "John", "email[primary]": "john@example.com" }; - expect(toQueryString(obj)).toBe("user%20name=John&email%5Bprimary%5D=john%40example.com"); - }); + const encodingTests: EncodingTestCase[] = [ + { + description: "should encode by default", + input: { name: "John Doe", email: "john@example.com" }, + expected: "name=John%20Doe&email=john%40example.com", + }, + { + description: "should not encode when encode is false", + input: { name: "John Doe", email: "john@example.com" }, + options: { encode: false }, + expected: "name=John Doe&email=john@example.com", + }, + { + description: "should encode special characters in keys", + input: { "user name": "John", "email[primary]": "john@example.com" }, + expected: "user%20name=John&email%5Bprimary%5D=john%40example.com", + }, + { + description: "should not encode special characters in keys when encode is false", + input: { "user name": "John", "email[primary]": "john@example.com" }, + options: { encode: false }, + expected: "user name=John&email[primary]=john@example.com", + }, + ]; - it("should not encode special characters in keys when encode is false", () => { - const obj = { "user name": "John", "email[primary]": "john@example.com" }; - expect(toQueryString(obj, { encode: false })).toBe("user name=John&email[primary]=john@example.com"); + encodingTests.forEach(({ description, input, options, expected }) => { + it(description, () => { + expect(toQueryString(input, options)).toBe(expected); + }); }); }); describe("Mixed scenarios", () => { - it("should handle complex nested structures", () => { - const obj = { - filters: { - status: ["active", "pending"], - category: { - type: "electronics", - subcategories: ["phones", "laptops"], + interface MixedTestCase { + description: string; + input: any; + options?: { arrayFormat?: "repeat" | "indices" }; + expected: string; + } + + const mixedTests: MixedTestCase[] = [ + { + description: "should handle complex nested structures", + input: { + filters: { + status: ["active", "pending"], + category: { + type: "electronics", + subcategories: ["phones", "laptops"], + }, }, + sort: { field: "name", direction: "asc" }, }, - sort: { field: "name", direction: "asc" }, - }; - expect(toQueryString(obj)).toBe( - "filters%5Bstatus%5D%5B0%5D=active&filters%5Bstatus%5D%5B1%5D=pending&filters%5Bcategory%5D%5Btype%5D=electronics&filters%5Bcategory%5D%5Bsubcategories%5D%5B0%5D=phones&filters%5Bcategory%5D%5Bsubcategories%5D%5B1%5D=laptops&sort%5Bfield%5D=name&sort%5Bdirection%5D=asc", - ); - }); - - it("should handle complex nested structures with repeat format", () => { - const obj = { - filters: { - status: ["active", "pending"], - category: { - type: "electronics", - subcategories: ["phones", "laptops"], + expected: + "filters%5Bstatus%5D%5B0%5D=active&filters%5Bstatus%5D%5B1%5D=pending&filters%5Bcategory%5D%5Btype%5D=electronics&filters%5Bcategory%5D%5Bsubcategories%5D%5B0%5D=phones&filters%5Bcategory%5D%5Bsubcategories%5D%5B1%5D=laptops&sort%5Bfield%5D=name&sort%5Bdirection%5D=asc", + }, + { + description: "should handle complex nested structures with repeat format", + input: { + filters: { + status: ["active", "pending"], + category: { + type: "electronics", + subcategories: ["phones", "laptops"], + }, }, + sort: { field: "name", direction: "asc" }, }, - sort: { field: "name", direction: "asc" }, - }; - expect(toQueryString(obj, { arrayFormat: "repeat" })).toBe( - "filters%5Bstatus%5D=active&filters%5Bstatus%5D=pending&filters%5Bcategory%5D%5Btype%5D=electronics&filters%5Bcategory%5D%5Bsubcategories%5D=phones&filters%5Bcategory%5D%5Bsubcategories%5D=laptops&sort%5Bfield%5D=name&sort%5Bdirection%5D=asc", - ); - }); - - it("should handle arrays with null/undefined values", () => { - const obj = { items: ["a", null, "c", undefined, "e"] }; - expect(toQueryString(obj)).toBe("items%5B0%5D=a&items%5B1%5D=&items%5B2%5D=c&items%5B4%5D=e"); - }); + options: { arrayFormat: "repeat" }, + expected: + "filters%5Bstatus%5D=active&filters%5Bstatus%5D=pending&filters%5Bcategory%5D%5Btype%5D=electronics&filters%5Bcategory%5D%5Bsubcategories%5D=phones&filters%5Bcategory%5D%5Bsubcategories%5D=laptops&sort%5Bfield%5D=name&sort%5Bdirection%5D=asc", + }, + { + description: "should handle arrays with null/undefined values", + input: { items: ["a", null, "c", undefined, "e"] }, + expected: "items%5B0%5D=a&items%5B1%5D=&items%5B2%5D=c&items%5B4%5D=e", + }, + { + description: "should handle objects with null/undefined values", + input: { name: "John", age: null, email: undefined, active: true }, + expected: "name=John&age=&active=true", + }, + ]; - it("should handle objects with null/undefined values", () => { - const obj = { name: "John", age: null, email: undefined, active: true }; - expect(toQueryString(obj)).toBe("name=John&age=&active=true"); + mixedTests.forEach(({ description, input, options, expected }) => { + it(description, () => { + expect(toQueryString(input, options)).toBe(expected); + }); }); }); describe("Edge cases", () => { - it("should handle numeric keys", () => { - const obj = { "0": "zero", "1": "one" }; - expect(toQueryString(obj)).toBe("0=zero&1=one"); - }); - - it("should handle boolean values in objects", () => { - const obj = { enabled: true, disabled: false }; - expect(toQueryString(obj)).toBe("enabled=true&disabled=false"); - }); - - it("should handle empty strings", () => { - const obj = { name: "", description: "test" }; - expect(toQueryString(obj)).toBe("name=&description=test"); - }); + const edgeCaseTests: BasicTestCase[] = [ + { + description: "should handle numeric keys", + input: { "0": "zero", "1": "one" }, + expected: "0=zero&1=one", + }, + { + description: "should handle boolean values in objects", + input: { enabled: true, disabled: false }, + expected: "enabled=true&disabled=false", + }, + { + description: "should handle empty strings", + input: { name: "", description: "test" }, + expected: "name=&description=test", + }, + { + description: "should handle zero values", + input: { count: 0, price: 0.0 }, + expected: "count=0&price=0", + }, + { + description: "should handle arrays with empty strings", + input: { items: ["a", "", "c"] }, + expected: "items%5B0%5D=a&items%5B1%5D=&items%5B2%5D=c", + }, + ]; - it("should handle zero values", () => { - const obj = { count: 0, price: 0.0 }; - expect(toQueryString(obj)).toBe("count=0&price=0"); - }); - - it("should handle arrays with empty strings", () => { - const obj = { items: ["a", "", "c"] }; - expect(toQueryString(obj)).toBe("items%5B0%5D=a&items%5B1%5D=&items%5B2%5D=c"); + edgeCaseTests.forEach(({ description, input, expected }) => { + it(description, () => { + expect(toQueryString(input)).toBe(expected); + }); }); }); describe("Options combinations", () => { - it("should respect both arrayFormat and encode options", () => { - const obj = { items: ["a & b", "c & d"] }; - expect(toQueryString(obj, { arrayFormat: "repeat", encode: false })).toBe("items=a & b&items=c & d"); - }); + interface OptionsTestCase { + description: string; + input: any; + options?: { arrayFormat?: "repeat" | "indices"; encode?: boolean }; + expected: string; + } - it("should use default options when none provided", () => { - const obj = { items: ["a", "b"] }; - expect(toQueryString(obj)).toBe("items%5B0%5D=a&items%5B1%5D=b"); - }); + const optionsTests: OptionsTestCase[] = [ + { + description: "should respect both arrayFormat and encode options", + input: { items: ["a & b", "c & d"] }, + options: { arrayFormat: "repeat", encode: false }, + expected: "items=a & b&items=c & d", + }, + { + description: "should use default options when none provided", + input: { items: ["a", "b"] }, + expected: "items%5B0%5D=a&items%5B1%5D=b", + }, + { + description: "should merge provided options with defaults", + input: { items: ["a", "b"], name: "John Doe" }, + options: { encode: false }, + expected: "items[0]=a&items[1]=b&name=John Doe", + }, + ]; - it("should merge provided options with defaults", () => { - const obj = { items: ["a", "b"], name: "John Doe" }; - expect(toQueryString(obj, { encode: false })).toBe("items[0]=a&items[1]=b&name=John Doe"); + optionsTests.forEach(({ description, input, options, expected }) => { + it(description, () => { + expect(toQueryString(input, options)).toBe(expected); + }); }); }); }); diff --git a/tests/wire/analytics.test.ts b/tests/wire/analytics.test.ts index a66aeb72..ba78d1c9 100644 --- a/tests/wire/analytics.test.ts +++ b/tests/wire/analytics.test.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Analytics", () => { +describe("AnalyticsClient", () => { test("get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { queries: [{ table: "call", name: "name", operations: [{ operation: "sum", column: "id" }] }], }; diff --git a/tests/wire/assistants.test.ts b/tests/wire/assistants.test.ts index fd9945f7..cb2fede4 100644 --- a/tests/wire/assistants.test.ts +++ b/tests/wire/assistants.test.ts @@ -1,15 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; -import * as Vapi from "../../src/api/index"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Assistants", () => { +describe("AssistantsClient", () => { test("list", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = [ { @@ -40,7 +37,7 @@ describe("Assistants", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -48,7 +45,17 @@ describe("Assistants", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -57,7 +64,18 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -72,14 +90,33 @@ describe("Assistants", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -93,6 +130,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -105,9 +143,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -162,6 +201,10 @@ describe("Assistants", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -235,9 +278,15 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, id: "id", @@ -248,17 +297,7 @@ describe("Assistants", () => { ]; server.mockEndpoint().get("/assistant").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.assistants.list({ - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.assistants.list(); expect(response).toEqual([ { transcriber: { @@ -290,7 +329,7 @@ describe("Assistants", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -307,6 +346,20 @@ describe("Assistants", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -316,12 +369,27 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -343,6 +411,22 @@ describe("Assistants", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -358,11 +442,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -376,6 +456,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -388,9 +469,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -488,6 +570,21 @@ describe("Assistants", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -569,6 +666,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -579,6 +677,20 @@ describe("Assistants", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -596,7 +708,7 @@ describe("Assistants", () => { test("create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { transcriber: { @@ -626,7 +738,7 @@ describe("Assistants", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -634,7 +746,17 @@ describe("Assistants", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -643,7 +765,18 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -670,12 +803,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - backoffPlan: { startAtSeconds: 1.1, frequencySeconds: 1.1, maxRetries: 1.1 }, - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -689,6 +817,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -701,9 +830,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false, recordingChannels: "mono" }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -785,6 +915,10 @@ describe("Assistants", () => { transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -858,6 +992,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, backoffPlan: { @@ -913,7 +1048,7 @@ describe("Assistants", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -930,6 +1065,20 @@ describe("Assistants", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -939,12 +1088,27 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1001,16 +1165,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - backoffPlan: { - startAtSeconds: 1.1, - frequencySeconds: 1.1, - maxRetries: 1.1, - }, - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1024,6 +1179,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1036,9 +1192,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1188,6 +1345,21 @@ describe("Assistants", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1269,6 +1441,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -1309,7 +1482,7 @@ describe("Assistants", () => { test("get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { transcriber: { @@ -1339,7 +1512,7 @@ describe("Assistants", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -1347,7 +1520,17 @@ describe("Assistants", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -1356,7 +1539,18 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -1383,12 +1577,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - backoffPlan: { startAtSeconds: 1.1, frequencySeconds: 1.1, maxRetries: 1.1 }, - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1402,6 +1591,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1414,9 +1604,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false, recordingChannels: "mono" }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -1498,6 +1689,10 @@ describe("Assistants", () => { transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1571,6 +1766,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, backoffPlan: { @@ -1588,7 +1784,9 @@ describe("Assistants", () => { }; server.mockEndpoint().get("/assistant/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.assistants.get("id"); + const response = await client.assistants.get({ + id: "id", + }); expect(response).toEqual({ transcriber: { provider: "assembly-ai", @@ -1619,7 +1817,7 @@ describe("Assistants", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -1636,6 +1834,20 @@ describe("Assistants", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1645,12 +1857,27 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1707,16 +1934,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - backoffPlan: { - startAtSeconds: 1.1, - frequencySeconds: 1.1, - maxRetries: 1.1, - }, - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1730,6 +1948,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1742,9 +1961,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1894,6 +2114,21 @@ describe("Assistants", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1975,6 +2210,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -2015,7 +2251,7 @@ describe("Assistants", () => { test("delete", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { transcriber: { @@ -2045,7 +2281,7 @@ describe("Assistants", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -2053,7 +2289,17 @@ describe("Assistants", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -2062,7 +2308,18 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -2089,12 +2346,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - backoffPlan: { startAtSeconds: 1.1, frequencySeconds: 1.1, maxRetries: 1.1 }, - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2108,6 +2360,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2120,9 +2373,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false, recordingChannels: "mono" }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -2204,6 +2458,10 @@ describe("Assistants", () => { transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2277,6 +2535,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, backoffPlan: { @@ -2294,7 +2553,9 @@ describe("Assistants", () => { }; server.mockEndpoint().delete("/assistant/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.assistants.delete("id"); + const response = await client.assistants.delete({ + id: "id", + }); expect(response).toEqual({ transcriber: { provider: "assembly-ai", @@ -2325,7 +2586,7 @@ describe("Assistants", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -2342,6 +2603,20 @@ describe("Assistants", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -2351,12 +2626,27 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2413,16 +2703,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - backoffPlan: { - startAtSeconds: 1.1, - frequencySeconds: 1.1, - maxRetries: 1.1, - }, - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2436,6 +2717,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2448,9 +2730,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -2600,6 +2883,21 @@ describe("Assistants", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2681,6 +2979,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -2721,7 +3020,7 @@ describe("Assistants", () => { test("update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { transcriber: { @@ -2751,7 +3050,7 @@ describe("Assistants", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -2759,7 +3058,17 @@ describe("Assistants", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -2768,7 +3077,18 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -2795,12 +3115,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - backoffPlan: { startAtSeconds: 1.1, frequencySeconds: 1.1, maxRetries: 1.1 }, - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2814,6 +3129,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2826,9 +3142,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false, recordingChannels: "mono" }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -2910,6 +3227,10 @@ describe("Assistants", () => { transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2983,6 +3304,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, backoffPlan: { @@ -3007,7 +3329,9 @@ describe("Assistants", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.assistants.update("id"); + const response = await client.assistants.update({ + id: "id", + }); expect(response).toEqual({ transcriber: { provider: "assembly-ai", @@ -3038,7 +3362,7 @@ describe("Assistants", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -3055,6 +3379,20 @@ describe("Assistants", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3064,12 +3402,27 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -3126,16 +3479,7 @@ describe("Assistants", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - backoffPlan: { - startAtSeconds: 1.1, - frequencySeconds: 1.1, - maxRetries: 1.1, - }, - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3149,6 +3493,7 @@ describe("Assistants", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3161,9 +3506,10 @@ describe("Assistants", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -3313,6 +3659,21 @@ describe("Assistants", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3394,6 +3755,7 @@ describe("Assistants", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", diff --git a/tests/wire/calls.test.ts b/tests/wire/calls.test.ts index c3f67119..8b6bc4f1 100644 --- a/tests/wire/calls.test.ts +++ b/tests/wire/calls.test.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Calls", () => { +describe("CallsClient", () => { test("list", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = [ { @@ -61,6 +59,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, analysis: { @@ -72,14 +74,16 @@ describe("Calls", () => { monitor: { listenUrl: "listenUrl", controlUrl: "controlUrl" }, artifact: { messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], transcript: "transcript", pcapUrl: "pcapUrl", logUrl: "logUrl", nodes: [{}], variableValues: { key: "value" }, structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, compliance: { recordingConsent: { type: { key: "value" } } }, campaignId: "campaignId", @@ -115,7 +119,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -129,6 +133,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -141,9 +146,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -182,7 +188,57 @@ describe("Calls", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -193,7 +249,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, assistantOverrides: { @@ -227,7 +294,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -241,6 +308,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -253,9 +321,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -268,7 +337,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -305,7 +384,57 @@ describe("Calls", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -316,7 +445,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, squadId: "squadId", @@ -351,12 +491,236 @@ describe("Calls", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, }, + squadOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { model: "claude-3-opus-20240229", provider: "anthropic" }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"] }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + variableValues: { key: "value" }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { waitSeconds: 0.4 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, workflowId: "workflowId", workflow: { nodes: [ @@ -393,7 +757,7 @@ describe("Calls", () => { name: "name", }, ], - model: { provider: "openai", model: "gpt-5" }, + model: { provider: "openai", model: "gpt-5.1" }, transcriber: { provider: "assembly-ai", confidenceThreshold: 0.4, @@ -421,10 +785,10 @@ describe("Calls", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, observabilityPlan: { provider: "langfuse", tags: ["tags"] }, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], credentials: [{ provider: "11labs", apiKey: "apiKey" }], - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", maxDurationSeconds: 600, name: "name", edges: [{ from: "from", to: "to" }], @@ -432,7 +796,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, compliancePlan: { recordingConsentPlan: { @@ -462,7 +837,57 @@ describe("Calls", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -490,7 +915,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, customerId: "customerId", @@ -525,8 +961,36 @@ describe("Calls", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -543,20 +1007,7 @@ describe("Calls", () => { ]; server.mockEndpoint().get("/call").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.calls.list({ - id: "id", - assistantId: "assistantId", - phoneNumberId: "phoneNumberId", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.calls.list(); expect(response).toEqual([ { type: "inboundPhoneCall", @@ -626,6 +1077,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, analysis: { @@ -656,7 +1122,7 @@ describe("Calls", () => { ], messagesOpenAIFormatted: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -670,7 +1136,11 @@ describe("Calls", () => { structuredOutputs: { key: "value", }, + scorecards: { + key: "value", + }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, compliance: { recordingConsent: { @@ -723,9 +1193,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -739,6 +1207,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -751,9 +1220,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -829,6 +1299,52 @@ describe("Calls", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -840,12 +1356,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -891,9 +1422,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -907,6 +1436,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -919,9 +1449,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -963,6 +1494,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1016,6 +1561,52 @@ describe("Calls", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -1027,12 +1618,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1076,8 +1682,36 @@ describe("Calls", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -1087,17 +1721,279 @@ describe("Calls", () => { ], }, }, - workflowId: "workflowId", - workflow: { - nodes: [ - { - type: "conversation", - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, + squadOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + model: "claude-3-opus-20240229", + provider: "anthropic", + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + }, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + hooks: [ + { + on: "call.ending", + do: [ + { + type: "tool", + }, + ], + }, + ], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + variableValues: { + key: "value", + }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { + key: "value", + }, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { + waitSeconds: 0.4, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + }, + workflowId: "workflowId", + workflow: { + nodes: [ + { + type: "conversation", + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, maxTurnSilence: 400, fallbackPlan: { transcribers: [ @@ -1131,7 +2027,7 @@ describe("Calls", () => { ], model: { provider: "openai", - model: "gpt-5", + model: "gpt-5.1", }, transcriber: { provider: "assembly-ai", @@ -1171,7 +2067,7 @@ describe("Calls", () => { provider: "langfuse", tags: ["tags"], }, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", hooks: [ { on: "call.ending", @@ -1188,9 +2084,7 @@ describe("Calls", () => { apiKey: "apiKey", }, ], - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", maxDurationSeconds: 600, name: "name", edges: [ @@ -1203,12 +2097,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, compliancePlan: { @@ -1251,6 +2160,52 @@ describe("Calls", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -1295,12 +2250,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1344,8 +2314,36 @@ describe("Calls", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -1374,7 +2372,7 @@ describe("Calls", () => { test("create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { type: "inboundPhoneCall", @@ -1408,8 +2406,10 @@ describe("Calls", () => { message: "message", timeout: 1.1, sipVerb: { key: "value" }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { message: "message" }, @@ -1463,6 +2463,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, analysis: { @@ -1474,7 +2478,7 @@ describe("Calls", () => { monitor: { listenUrl: "listenUrl", controlUrl: "controlUrl" }, artifact: { messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, transcript: "transcript", pcapUrl: "pcapUrl", @@ -1488,9 +2492,15 @@ describe("Calls", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } }, campaignId: "campaignId", @@ -1523,7 +2533,7 @@ describe("Calls", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -1531,7 +2541,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -1540,9 +2560,20 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, model: "claude-3-opus-20240229", provider: "anthropic", thinking: { type: "enabled", budgetTokens: 1.1 }, @@ -1555,14 +2586,33 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1576,6 +2626,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1588,9 +2639,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -1645,6 +2697,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1718,9 +2774,15 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -1752,7 +2814,7 @@ describe("Calls", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -1760,7 +2822,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -1769,7 +2841,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -1784,14 +2867,33 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1805,6 +2907,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1817,9 +2920,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -1832,7 +2936,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -1885,6 +2999,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1958,9 +3076,15 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -1999,7 +3123,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2013,6 +3137,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2025,9 +3150,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -2040,7 +3166,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -2077,7 +3213,57 @@ describe("Calls", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -2088,45 +3274,22 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, }, - workflowId: "workflowId", - workflow: { - nodes: [ - { - type: "conversation", - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - name: "name", - }, - ], - model: { provider: "openai", model: "gpt-5", temperature: 1.1, maxTokens: 1.1 }, + squadOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -2153,30 +3316,147 @@ describe("Calls", () => { ], }, }, + model: { + messages: [{ content: null, role: "assistant" }], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { type: "enabled", budgetTokens: 1.1 }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, voice: { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, - backgroundSound: "off", - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], credentials: [{ provider: "11labs", apiKey: "apiKey" }], - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, - maxDurationSeconds: 600, + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + variableValues: { key: "value" }, name: "name", - edges: [{ from: "from", to: "to" }], - globalPrompt: "globalPrompt", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], compliancePlan: { hipaaEnabled: true, pciEnabled: true, @@ -2193,6 +3473,16 @@ describe("Calls", () => { waitSeconds: 3, }, }, + metadata: { key: "value" }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, analysisPlan: { minMessagesThreshold: 1.1, structuredDataMultiPlan: [{ key: "key", plan: {} }], @@ -2212,6 +3502,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2281,60 +3575,300 @@ describe("Calls", () => { controlEnabled: false, controlAuthenticationEnabled: false, }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, - }, - }, credentialIds: ["credentialIds"], - keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, - voicemailMessage: "voicemailMessage", - }, - workflowOverrides: { variableValues: { key: "value" } }, - phoneNumberId: "phoneNumberId", - phoneNumber: { - fallbackDestination: { - message: "message", - type: "number", - numberE164CheckEnabled: true, - number: "number", - extension: "extension", - callerId: "callerId", - transferPlan: { mode: "blind-transfer" }, - description: "description", - }, - hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }], - smsEnabled: true, - twilioPhoneNumber: "twilioPhoneNumber", - twilioAccountSid: "twilioAccountSid", - twilioAuthToken: "twilioAuthToken", - twilioApiKey: "twilioApiKey", - twilioApiSecret: "twilioApiSecret", - name: "name", - assistantId: "assistantId", - workflowId: "workflowId", - squadId: "squadId", server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, - customerId: "customerId", - customer: { - numberE164CheckEnabled: true, - extension: "extension", - assistantOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, + workflowId: "workflowId", + workflow: { + nodes: [ + { + type: "conversation", + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + name: "name", + }, + ], + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + voicemailDetection: "off", + maxDurationSeconds: 600, + name: "name", + edges: [{ from: "from", to: "to" }], + globalPrompt: "globalPrompt", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, + }, + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [{ key: "key", plan: {} }], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, + credentialIds: ["credentialIds"], + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + voicemailMessage: "voicemailMessage", + }, + workflowOverrides: { variableValues: { key: "value" } }, + phoneNumberId: "phoneNumberId", + phoneNumber: { + fallbackDestination: { + message: "message", + type: "number", + numberE164CheckEnabled: true, + number: "number", + extension: "extension", + callerId: "callerId", + transferPlan: { mode: "blind-transfer" }, + description: "description", + }, + hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }], + smsEnabled: true, + twilioPhoneNumber: "twilioPhoneNumber", + twilioAccountSid: "twilioAccountSid", + twilioAuthToken: "twilioAuthToken", + twilioApiKey: "twilioApiKey", + twilioApiSecret: "twilioApiSecret", + name: "name", + assistantId: "assistantId", + workflowId: "workflowId", + squadId: "squadId", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, + }, + }, + customerId: "customerId", + customer: { + numberE164CheckEnabled: true, + extension: "extension", + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, endOfTurnConfidenceThreshold: 0.7, minEndOfTurnSilenceWhenConfident: 160, maxTurnSilence: 400, @@ -2361,7 +3895,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2375,6 +3909,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2387,9 +3922,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -2402,7 +3938,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -2439,7 +3985,57 @@ describe("Calls", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -2450,7 +4046,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, number: "number", @@ -2516,8 +4123,13 @@ describe("Calls", () => { sipVerb: { key: "value", }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { + type: "lastNMessages", + maxMessages: 1.1, + }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { @@ -2577,6 +4189,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, analysis: { @@ -2607,7 +4234,7 @@ describe("Calls", () => { ], messagesOpenAIFormatted: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -2630,11 +4257,19 @@ describe("Calls", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value", }, + scorecards: { + key: "value", + }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, compliance: { recordingConsent: { @@ -2676,7 +4311,7 @@ describe("Calls", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -2693,6 +4328,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -2702,12 +4351,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2729,6 +4393,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -2744,11 +4424,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2762,6 +4438,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2774,9 +4451,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -2874,6 +4552,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2955,6 +4648,7 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -2965,6 +4659,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -3003,7 +4711,7 @@ describe("Calls", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -3020,6 +4728,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3029,12 +4751,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -3056,6 +4793,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -3071,11 +4824,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3089,6 +4838,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3101,9 +4851,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -3148,6 +4899,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3220,6 +4985,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3301,6 +5081,7 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -3311,6 +5092,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -3365,9 +5160,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3381,6 +5174,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3393,9 +5187,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -3437,6 +5232,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3490,6 +5299,52 @@ describe("Calls", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -3501,64 +5356,32 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, }, - workflowId: "workflowId", - workflow: { - nodes: [ - { - type: "conversation", - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - name: "name", - }, - ], - model: { - provider: "openai", - model: "gpt-5", - temperature: 1.1, - maxTokens: 1.1, - }, + squadOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -3585,78 +5408,221 @@ describe("Calls", () => { ], }, }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - chunkPlan: { - enabled: true, - minCharacters: 30, - }, - speed: 1.1, - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - observabilityPlan: { - provider: "langfuse", - tags: ["tags"], - metadata: { - key: "value", - }, - }, - backgroundSound: "off", - hooks: [ - { - on: "call.ending", - do: [ - { - type: "tool", + model: { + messages: [ + { + content: null, + role: "assistant", + }, + ], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - ], - }, - ], + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { + type: "enabled", + budgetTokens: 1.1, + }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + metadata: { + key: "value", + }, + }, credentials: [ { provider: "11labs", apiKey: "apiKey", }, ], - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, - maxDurationSeconds: 600, - name: "name", - edges: [ + hooks: [ { - from: "from", - to: "to", + on: "call.ending", + do: [ + { + type: "tool", + }, + ], }, ], - globalPrompt: "globalPrompt", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { - key: "value", - }, - backoffPlan: { - type: { - key: "value", + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - maxRetries: 0, - baseDelaySeconds: 1, }, + ], + variableValues: { + key: "value", }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], compliancePlan: { hipaaEnabled: true, pciEnabled: true, @@ -3681,6 +5647,18 @@ describe("Calls", () => { waitSeconds: 3, }, }, + metadata: { + key: "value", + }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, analysisPlan: { minMessagesThreshold: 1.1, structuredDataMultiPlan: [ @@ -3707,6 +5685,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3784,65 +5777,11 @@ describe("Calls", () => { controlEnabled: false, controlAuthenticationEnabled: false, }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, - }, - }, credentialIds: ["credentialIds"], - keypadInputPlan: { - enabled: true, - timeoutSeconds: 1.1, - delimiters: "#", - }, - voicemailMessage: "voicemailMessage", - }, - workflowOverrides: { - variableValues: { - key: "value", - }, - }, - phoneNumberId: "phoneNumberId", - phoneNumber: { - fallbackDestination: { - message: "message", - type: "number", - numberE164CheckEnabled: true, - number: "number", - extension: "extension", - callerId: "callerId", - transferPlan: { - mode: "blind-transfer", - }, - description: "description", - }, - hooks: [ - { - on: "call.ringing", - do: [ - { - type: "transfer", - }, - ], - }, - ], - smsEnabled: true, - twilioPhoneNumber: "twilioPhoneNumber", - twilioAccountSid: "twilioAccountSid", - twilioAuthToken: "twilioAuthToken", - twilioApiKey: "twilioApiKey", - twilioApiSecret: "twilioApiSecret", - name: "name", - assistantId: "assistantId", - workflowId: "workflowId", - squadId: "squadId", server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -3853,252 +5792,33 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", + }, }, - customerId: "customerId", - customer: { - numberE164CheckEnabled: true, - extension: "extension", - assistantOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - model: { - model: "claude-3-opus-20240229", - provider: "anthropic", - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", - ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [ - { - provider: "twilio", - timeout: 60, - record: false, - }, - ], - observabilityPlan: { - provider: "langfuse", - tags: ["tags"], - }, - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", - }, - ], - hooks: [ - { - on: "call.ending", - do: [ - { - type: "tool", - }, - ], - }, - ], - "tools:append": [ - { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { - type: { - key: "value", - }, - maxRetries: 0, - baseDelaySeconds: 1, - }, - }, - ], - variableValues: { - key: "value", - }, - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - type: "stay-on-line", - waitSeconds: 3, - }, - }, - metadata: { - key: "value", - }, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - }, - startSpeakingPlan: { - waitSeconds: 0.4, - }, - stopSpeakingPlan: { - numWords: 0, - voiceSeconds: 0.2, - backoffSeconds: 1, - }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { - type: { - key: "value", - }, - maxRetries: 0, - baseDelaySeconds: 1, - }, - }, - }, - number: "number", - sipUri: "sipUri", - name: "name", - email: "email", - externalId: "externalId", - }, - name: "name", - schedulePlan: { - earliestAt: "2024-01-15T09:30:00Z", - latestAt: "2024-01-15T09:30:00Z", - }, - transport: { - key: "value", - }, - }); - }); - - test("CallController_findAllPaginated", async () => { - const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { - results: [ - { - type: "inboundPhoneCall", - costs: [{ type: "transport", minutes: 1.1, cost: 1.1 }], - messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - phoneCallTransport: "sip", - status: "scheduled", - endedReason: "call-start-error-neither-assistant-nor-server-set", - destination: { type: "number", number: "number" }, - id: "id", - orgId: "orgId", - createdAt: "2024-01-15T09:30:00Z", - updatedAt: "2024-01-15T09:30:00Z", - startedAt: "2024-01-15T09:30:00Z", - endedAt: "2024-01-15T09:30:00Z", - cost: 1.1, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - }, - campaignId: "campaignId", - assistantId: "assistantId", - assistant: { + workflowId: "workflowId", + workflow: { + nodes: [ + { + type: "conversation", transcriber: { provider: "assembly-ai", confidenceThreshold: 0.4, @@ -4123,206 +5843,2586 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, }, - firstMessage: "Hello! How can I help you today?", - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], + name: "name", }, - assistantOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], + ], + model: { + provider: "openai", + model: "gpt-5.1", + temperature: 1.1, + maxTokens: 1.1, + }, + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, }, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - firstMessage: "Hello! How can I help you today?", - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], + ], }, - squadId: "squadId", - squad: { members: [{}] }, - workflowId: "workflowId", - workflow: { - nodes: [ + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { + voices: [ { - type: "conversation", - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], - }, - }, - name: "name", + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", }, ], - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], + }, + }, + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + metadata: { + key: "value", + }, + }, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + hooks: [ + { + on: "call.ending", + do: [ + { + type: "tool", }, + ], + }, + ], + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + voicemailDetection: "off", + maxDurationSeconds: 600, + name: "name", + edges: [ + { + from: "from", + to: "to", + }, + ], + globalPrompt: "globalPrompt", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { + key: "value", + }, + backoffPlan: { + type: { + key: "value", }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", voice: { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, }, - backgroundSound: "off", - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - maxDurationSeconds: 600, - name: "name", - edges: [{ from: "from", to: "to" }], + type: "stay-on-line", + waitSeconds: 3, }, - phoneNumberId: "phoneNumberId", - phoneNumber: { twilioPhoneNumber: "twilioPhoneNumber", twilioAccountSid: "twilioAccountSid" }, - customerId: "customerId", - name: "name", - schedulePlan: { earliestAt: "2024-01-15T09:30:00Z" }, - transport: { key: "value" }, }, - ], - metadata: { - itemsPerPage: 1.1, - totalItems: 1.1, - currentPage: 1.1, - itemsBeyondRetention: true, - createdAtLe: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - }, - }; - server.mockEndpoint().get("/v2/call").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - - const response = await client.calls.callControllerFindAllPaginated({ - assistantId: "assistantId", - assistantName: "assistantName", - id: "id", - costLe: 1.1, - costGe: 1.1, - cost: 1.1, - successEvaluation: "successEvaluation", - endedReason: "endedReason", - phoneNumberId: "phoneNumberId", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); - expect(response).toEqual({ - results: [ - { - type: "inboundPhoneCall", - costs: [ + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [ { - type: "transport", - minutes: 1.1, - cost: 1.1, + key: "key", + plan: {}, }, ], - messages: [ - { - role: "role", - message: "message", - time: 1.1, - endTime: 1.1, - secondsFromStart: 1.1, - }, + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { + enabled: true, + }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { + provider: "vapi", + }, + customEndpointingRules: [ + { + type: "assistant", + regex: "regex", + timeoutSeconds: 1.1, + }, + ], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, + credentialIds: ["credentialIds"], + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", + }, + voicemailMessage: "voicemailMessage", + }, + workflowOverrides: { + variableValues: { + key: "value", + }, + }, + phoneNumberId: "phoneNumberId", + phoneNumber: { + fallbackDestination: { + message: "message", + type: "number", + numberE164CheckEnabled: true, + number: "number", + extension: "extension", + callerId: "callerId", + transferPlan: { + mode: "blind-transfer", + }, + description: "description", + }, + hooks: [ + { + on: "call.ringing", + do: [ + { + type: "transfer", + }, + ], + }, + ], + smsEnabled: true, + twilioPhoneNumber: "twilioPhoneNumber", + twilioAccountSid: "twilioAccountSid", + twilioAuthToken: "twilioAuthToken", + twilioApiKey: "twilioApiKey", + twilioApiSecret: "twilioApiSecret", + name: "name", + assistantId: "assistantId", + workflowId: "workflowId", + squadId: "squadId", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { + key: "value", + }, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + }, + customerId: "customerId", + customer: { + numberE164CheckEnabled: true, + extension: "extension", + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + model: "claude-3-opus-20240229", + provider: "anthropic", + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + }, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + hooks: [ + { + on: "call.ending", + do: [ + { + type: "tool", + }, + ], + }, + ], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + variableValues: { + key: "value", + }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { + key: "value", + }, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { + waitSeconds: 0.4, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + }, + number: "number", + sipUri: "sipUri", + name: "name", + email: "email", + externalId: "externalId", + }, + name: "name", + schedulePlan: { + earliestAt: "2024-01-15T09:30:00Z", + latestAt: "2024-01-15T09:30:00Z", + }, + transport: { + key: "value", + }, + }); + }); + + test("CallController_findAllPaginated", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + results: [ + { + type: "inboundPhoneCall", + costs: [{ type: "transport", minutes: 1.1, cost: 1.1 }], + messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], + phoneCallTransport: "sip", + status: "scheduled", + endedReason: "call-start-error-neither-assistant-nor-server-set", + destination: { type: "number", number: "number" }, + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + startedAt: "2024-01-15T09:30:00Z", + endedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + campaignId: "campaignId", + assistantId: "assistantId", + assistant: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + }, + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + }, + squadId: "squadId", + squad: { members: [{}] }, + squadOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + }, + workflowId: "workflowId", + workflow: { + nodes: [ + { + type: "conversation", + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], + }, + }, + name: "name", + }, + ], + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + maxDurationSeconds: 600, + name: "name", + edges: [{ from: "from", to: "to" }], + }, + phoneNumberId: "phoneNumberId", + phoneNumber: { twilioPhoneNumber: "twilioPhoneNumber", twilioAccountSid: "twilioAccountSid" }, + customerId: "customerId", + name: "name", + schedulePlan: { earliestAt: "2024-01-15T09:30:00Z" }, + transport: { key: "value" }, + }, + ], + metadata: { + itemsPerPage: 1.1, + totalItems: 1.1, + currentPage: 1.1, + itemsBeyondRetention: true, + createdAtLe: "2024-01-15T09:30:00Z", + createdAtGe: "2024-01-15T09:30:00Z", + }, + }; + server.mockEndpoint().get("/v2/call").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); + + const response = await client.calls.callControllerFindAllPaginated(); + expect(response).toEqual({ + results: [ + { + type: "inboundPhoneCall", + costs: [ + { + type: "transport", + minutes: 1.1, + cost: 1.1, + }, + ], + messages: [ + { + role: "role", + message: "message", + time: 1.1, + endTime: 1.1, + secondsFromStart: 1.1, + }, + ], + phoneCallTransport: "sip", + status: "scheduled", + endedReason: "call-start-error-neither-assistant-nor-server-set", + destination: { + type: "number", + number: "number", + }, + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + startedAt: "2024-01-15T09:30:00Z", + endedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + campaignId: "campaignId", + assistantId: "assistantId", + assistant: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + }, + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + }, + squadId: "squadId", + squad: { + members: [{}], + }, + squadOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + }, + workflowId: "workflowId", + workflow: { + nodes: [ + { + type: "conversation", + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + name: "name", + }, + ], + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + maxDurationSeconds: 600, + name: "name", + edges: [ + { + from: "from", + to: "to", + }, + ], + }, + phoneNumberId: "phoneNumberId", + phoneNumber: { + twilioPhoneNumber: "twilioPhoneNumber", + twilioAccountSid: "twilioAccountSid", + }, + customerId: "customerId", + name: "name", + schedulePlan: { + earliestAt: "2024-01-15T09:30:00Z", + }, + transport: { + key: "value", + }, + }, + ], + metadata: { + itemsPerPage: 1.1, + totalItems: 1.1, + currentPage: 1.1, + itemsBeyondRetention: true, + createdAtLe: "2024-01-15T09:30:00Z", + createdAtGe: "2024-01-15T09:30:00Z", + }, + }); + }); + + test("get", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + type: "inboundPhoneCall", + costs: [{ type: "transport", provider: "daily", minutes: 1.1, cost: 1.1 }], + messages: [ + { + role: "role", + message: "message", + time: 1.1, + endTime: 1.1, + secondsFromStart: 1.1, + duration: 1.1, + isFiltered: true, + detectedThreats: ["detectedThreats"], + originalMessage: "originalMessage", + metadata: { key: "value" }, + }, + ], + phoneCallTransport: "sip", + status: "scheduled", + endedReason: "call-start-error-neither-assistant-nor-server-set", + destination: { + message: "message", + type: "number", + numberE164CheckEnabled: true, + number: "number", + extension: "extension", + callerId: "callerId", + transferPlan: { + mode: "blind-transfer", + message: "message", + timeout: 1.1, + sipVerb: { key: "value" }, + dialTimeout: 1.1, + holdAudioUrl: "holdAudioUrl", + transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 }, + twiml: "twiml", + sipHeadersInReferToEnabled: true, + fallbackPlan: { message: "message" }, + }, + description: "description", + }, + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + startedAt: "2024-01-15T09:30:00Z", + endedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costBreakdown: { + transport: 1.1, + stt: 1.1, + llm: 1.1, + tts: 1.1, + vapi: 1.1, + chat: 1.1, + total: 1.1, + llmPromptTokens: 1.1, + llmCompletionTokens: 1.1, + ttsCharacters: 1.1, + analysisCostBreakdown: { + summary: 1.1, + summaryPromptTokens: 1.1, + summaryCompletionTokens: 1.1, + structuredData: 1.1, + structuredDataPromptTokens: 1.1, + structuredDataCompletionTokens: 1.1, + successEvaluation: 1.1, + successEvaluationPromptTokens: 1.1, + successEvaluationCompletionTokens: 1.1, + structuredOutput: 1.1, + structuredOutputPromptTokens: 1.1, + structuredOutputCompletionTokens: 1.1, + }, + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + analysis: { + summary: "summary", + structuredData: { key: "value" }, + structuredDataMulti: [{ key: "value" }], + successEvaluation: "successEvaluation", + }, + monitor: { listenUrl: "listenUrl", controlUrl: "controlUrl" }, + artifact: { + messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], + recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, + transcript: "transcript", + pcapUrl: "pcapUrl", + logUrl: "logUrl", + nodes: [{}], + variableValues: { key: "value" }, + performanceMetrics: { + turnLatencies: [{}], + modelLatencyAverage: 1.1, + voiceLatencyAverage: 1.1, + transcriberLatencyAverage: 1.1, + endpointingLatencyAverage: 1.1, + turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, + }, + structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, + transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", + }, + compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } }, + campaignId: "campaignId", + assistantId: "assistantId", + assistant: { + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + messages: [{ content: null, role: "assistant" }], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { type: "enabled", budgetTokens: 1.1 }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [{ key: "key", plan: {} }], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, + }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + }, + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + messages: [{ content: null, role: "assistant" }], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { type: "enabled", budgetTokens: 1.1 }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + variableValues: { key: "value" }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [{ key: "key", plan: {} }], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, + }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + }, + squadId: "squadId", + squad: { + name: "name", + members: [{}], + membersOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { model: "claude-3-opus-20240229", provider: "anthropic" }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"] }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + variableValues: { key: "value" }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { waitSeconds: 0.4 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, + }, + squadOverrides: { + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + messages: [{ content: null, role: "assistant" }], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { type: "enabled", budgetTokens: 1.1 }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + variableValues: { key: "value" }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [{ key: "key", plan: {} }], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", ], - phoneCallTransport: "sip", - status: "scheduled", - endedReason: "call-start-error-neither-assistant-nor-server-set", - destination: { - type: "number", - number: "number", - }, - id: "id", - orgId: "orgId", - createdAt: "2024-01-15T09:30:00Z", - updatedAt: "2024-01-15T09:30:00Z", - startedAt: "2024-01-15T09:30:00Z", - endedAt: "2024-01-15T09:30:00Z", - cost: 1.1, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], }, - campaignId: "campaignId", - assistantId: "assistantId", - assistant: { + }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + }, + workflowId: "workflowId", + workflow: { + nodes: [ + { + type: "conversation", transcriber: { provider: "assembly-ai", confidenceThreshold: 0.4, @@ -4347,202 +8447,471 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, - firstMessage: "Hello! How can I help you today?", - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - credentials: [ + name: "name", + }, + ], + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ { - provider: "11labs", - apiKey: "apiKey", + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, }, ], }, - assistantOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + voicemailDetection: "off", + maxDurationSeconds: 600, + name: "name", + edges: [{ from: "from", to: "to" }], + globalPrompt: "globalPrompt", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, + }, + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", voice: { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, - firstMessage: "Hello! How can I help you today?", - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", - }, - ], + type: "stay-on-line", + waitSeconds: 3, + }, + }, + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [{ key: "key", plan: {} }], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, }, - squadId: "squadId", - squad: { - members: [{}], + }, + credentialIds: ["credentialIds"], + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + voicemailMessage: "voicemailMessage", + }, + workflowOverrides: { variableValues: { key: "value" } }, + phoneNumberId: "phoneNumberId", + phoneNumber: { + fallbackDestination: { + message: "message", + type: "number", + numberE164CheckEnabled: true, + number: "number", + extension: "extension", + callerId: "callerId", + transferPlan: { mode: "blind-transfer" }, + description: "description", + }, + hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }], + smsEnabled: true, + twilioPhoneNumber: "twilioPhoneNumber", + twilioAccountSid: "twilioAccountSid", + twilioAuthToken: "twilioAuthToken", + twilioApiKey: "twilioApiKey", + twilioApiSecret: "twilioApiSecret", + name: "name", + assistantId: "assistantId", + workflowId: "workflowId", + squadId: "squadId", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], }, - workflowId: "workflowId", - workflow: { - nodes: [ - { - type: "conversation", - transcriber: { + }, + }, + customerId: "customerId", + customer: { + numberE164CheckEnabled: true, + extension: "extension", + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { provider: "assembly-ai", confidenceThreshold: 0.4, formatTurns: true, endOfTurnConfidenceThreshold: 0.7, minEndOfTurnSilenceWhenConfident: 160, maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, }, - name: "name", - }, - ], - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, + ], }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, + }, + model: { model: "claude-3-opus-20240229", provider: "anthropic" }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"] }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, ], }, }, - backgroundSound: "off", - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", + ], + variableValues: { key: "value" }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], + }, }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { waitSeconds: 0.4 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", ], - maxDurationSeconds: 600, - name: "name", - edges: [ - { - from: "from", - to: "to", - }, + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", ], }, - phoneNumberId: "phoneNumberId", - phoneNumber: { - twilioPhoneNumber: "twilioPhoneNumber", - twilioAccountSid: "twilioAccountSid", - }, - customerId: "customerId", - name: "name", - schedulePlan: { - earliestAt: "2024-01-15T09:30:00Z", + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, }, - transport: { - key: "value", + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, - ], - metadata: { - itemsPerPage: 1.1, - totalItems: 1.1, - currentPage: 1.1, - itemsBeyondRetention: true, - createdAtLe: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", + number: "number", + sipUri: "sipUri", + name: "name", + email: "email", + externalId: "externalId", }, - }); - }); - - test("get", async () => { - const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + name: "name", + schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" }, + transport: { key: "value" }, + }; + server.mockEndpoint().get("/call/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const rawResponseBody = { + const response = await client.calls.get({ + id: "id", + }); + expect(response).toEqual({ type: "inboundPhoneCall", - costs: [{ type: "transport", provider: "daily", minutes: 1.1, cost: 1.1 }], + costs: [ + { + type: "transport", + provider: "daily", + minutes: 1.1, + cost: 1.1, + }, + ], messages: [ { role: "role", @@ -4554,7 +8923,9 @@ describe("Calls", () => { isFiltered: true, detectedThreats: ["detectedThreats"], originalMessage: "originalMessage", - metadata: { key: "value" }, + metadata: { + key: "value", + }, }, ], phoneCallTransport: "sip", @@ -4571,12 +8942,21 @@ describe("Calls", () => { mode: "blind-transfer", message: "message", timeout: 1.1, - sipVerb: { key: "value" }, + sipVerb: { + key: "value", + }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { + type: "lastNMessages", + maxMessages: 1.1, + }, twiml: "twiml", sipHeadersInReferToEnabled: true, - fallbackPlan: { message: "message" }, + fallbackPlan: { + message: "message", + }, }, description: "description", }, @@ -4624,271 +9004,106 @@ describe("Calls", () => { pcapUseCustomStorageEnabled: true, loggingEnabled: true, loggingUseCustomStorageEnabled: true, - transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, + transcriptPlan: { + enabled: true, + assistantName: "assistantName", + userName: "userName", + }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], - loggingPath: "loggingPath", - }, - analysis: { - summary: "summary", - structuredData: { key: "value" }, - structuredDataMulti: [{ key: "value" }], - successEvaluation: "successEvaluation", - }, - monitor: { listenUrl: "listenUrl", controlUrl: "controlUrl" }, - artifact: { - messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], - recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, - transcript: "transcript", - pcapUrl: "pcapUrl", - logUrl: "logUrl", - nodes: [{}], - variableValues: { key: "value" }, - performanceMetrics: { - turnLatencies: [{}], - modelLatencyAverage: 1.1, - voiceLatencyAverage: 1.1, - transcriberLatencyAverage: 1.1, - endpointingLatencyAverage: 1.1, - turnLatencyAverage: 1.1, - }, - structuredOutputs: { key: "value" }, - transfers: ["transfers"], - }, - compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } }, - campaignId: "campaignId", - assistantId: "assistantId", - assistant: { - transcriber: { - provider: "assembly-ai", - language: "en", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - realtimeUrl: "realtimeUrl", - wordBoost: ["wordBoost"], - keytermsPrompt: ["keytermsPrompt"], - endUtteranceSilenceThreshold: 1.1, - disablePartialTranscripts: true, - fallbackPlan: { - transcribers: [ + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], }, ], }, + ], + loggingPath: "loggingPath", + }, + analysis: { + summary: "summary", + structuredData: { + key: "value", }, - model: { - messages: [{ content: undefined, role: "assistant" }], - tools: [ - { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - ], - toolIds: ["toolIds"], - knowledgeBase: { - provider: "custom-knowledge-base", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, + structuredDataMulti: [ + { + key: "value", }, - model: "claude-3-opus-20240229", - provider: "anthropic", - thinking: { type: "enabled", budgetTokens: 1.1 }, - temperature: 1.1, - maxTokens: 1.1, - emotionRecognitionEnabled: true, - numFastTurns: 1.1, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, - speed: 1.1, - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], - observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - hipaaEnabled: true, - pciEnabled: true, - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - type: "stay-on-line", - waitSeconds: 3, - }, - }, - metadata: { key: "value" }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, + successEvaluation: "successEvaluation", + }, + monitor: { + listenUrl: "listenUrl", + controlUrl: "controlUrl", + }, + artifact: { + messages: [ + { + role: "role", + message: "message", + time: 1.1, + endTime: 1.1, + secondsFromStart: 1.1, }, + ], + messagesOpenAIFormatted: [ + { + content: null, + role: "assistant", + }, + ], + recording: { + stereoUrl: "stereoUrl", + videoUrl: "videoUrl", + videoRecordingStartDelaySeconds: 1.1, }, - analysisPlan: { - minMessagesThreshold: 1.1, - structuredDataMultiPlan: [{ key: "key", plan: {} }], - outcomeIds: ["outcomeIds"], - }, - artifactPlan: { - recordingEnabled: true, - recordingFormat: "wav;l16", - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - transcriptPlan: { enabled: true }, - recordingPath: "recordingPath", - structuredOutputIds: ["structuredOutputIds"], - loggingPath: "loggingPath", + transcript: "transcript", + pcapUrl: "pcapUrl", + logUrl: "logUrl", + nodes: [{}], + variableValues: { + key: "value", }, - startSpeakingPlan: { - waitSeconds: 0.4, - smartEndpointingPlan: { provider: "vapi" }, - customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], - transcriptionEndpointingPlan: { - onPunctuationSeconds: 0.1, - onNoPunctuationSeconds: 1.5, - onNumberSeconds: 0.5, - }, + performanceMetrics: { + turnLatencies: [{}], + modelLatencyAverage: 1.1, + voiceLatencyAverage: 1.1, + transcriberLatencyAverage: 1.1, + endpointingLatencyAverage: 1.1, + turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, - stopSpeakingPlan: { - numWords: 0, - voiceSeconds: 0.2, - backoffSeconds: 1, - acknowledgementPhrases: [ - "i understand", - "i see", - "i got it", - "i hear you", - "im listening", - "im with you", - "right", - "okay", - "ok", - "sure", - "alright", - "got it", - "understood", - "yeah", - "yes", - "uh-huh", - "mm-hmm", - "gotcha", - "mhmm", - "ah", - "yeah okay", - "yeah sure", - ], - interruptionPhrases: [ - "stop", - "shut", - "up", - "enough", - "quiet", - "silence", - "but", - "dont", - "not", - "no", - "hold", - "wait", - "cut", - "pause", - "nope", - "nah", - "nevermind", - "never", - "bad", - "actually", - ], + structuredOutputs: { + key: "value", }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, + scorecards: { + key: "value", }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", + }, + compliance: { + recordingConsent: { + type: { + key: "value", + }, + grantedAt: "2024-01-15T09:30:00Z", }, - keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, - assistantOverrides: { + campaignId: "campaignId", + assistantId: "assistantId", + assistant: { transcriber: { provider: "assembly-ai", language: "en", @@ -4916,7 +9131,12 @@ describe("Calls", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [ + { + content: null, + role: "assistant", + }, + ], tools: [ { type: "apiRequest", @@ -4924,7 +9144,27 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, }, ], toolIds: ["toolIds"], @@ -4933,12 +9173,36 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, }, }, model: "claude-3-opus-20240229", provider: "anthropic", - thinking: { type: "enabled", budgetTokens: 1.1 }, + thinking: { + type: "enabled", + budgetTokens: 1.1, + }, temperature: 1.1, maxTokens: 1.1, emotionRecognitionEnabled: true, @@ -4948,14 +9212,41 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -4969,6 +9260,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -4981,25 +9273,41 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, - transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], - observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], - "tools:append": [ + transportConfigurations: [ { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + metadata: { + key: "value", + }, + }, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + hooks: [ + { + on: "call.ending", + do: [ + { + type: "tool", + }, + ], }, ], - variableValues: { key: "value" }, name: "name", voicemailMessage: "voicemailMessage", endCallMessage: "endCallMessage", @@ -5014,13 +9322,23 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, }, type: "stay-on-line", waitSeconds: 3, }, }, - metadata: { key: "value" }, + metadata: { + key: "value", + }, backgroundSpeechDenoisingPlan: { fourierDenoisingPlan: { mediaDetectionEnabled: true, @@ -5032,7 +9350,12 @@ describe("Calls", () => { }, analysisPlan: { minMessagesThreshold: 1.1, - structuredDataMultiPlan: [{ key: "key", plan: {} }], + structuredDataMultiPlan: [ + { + key: "key", + plan: {}, + }, + ], outcomeIds: ["outcomeIds"], }, artifactPlan: { @@ -5046,15 +9369,40 @@ describe("Calls", () => { pcapUseCustomStorageEnabled: true, loggingEnabled: true, loggingUseCustomStorageEnabled: true, - transcriptPlan: { enabled: true }, + transcriptPlan: { + enabled: true, + }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { waitSeconds: 0.4, - smartEndpointingPlan: { provider: "vapi" }, - customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + smartEndpointingPlan: { + provider: "vapi", + }, + customEndpointingRules: [ + { + type: "assistant", + regex: "regex", + timeoutSeconds: 1.1, + }, + ], transcriptionEndpointingPlan: { onPunctuationSeconds: 0.1, onNoPunctuationSeconds: 1.5, @@ -5122,225 +9470,281 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, - }, - squadId: "squadId", - squad: { - name: "name", - members: [{}], - membersOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], + headers: { + key: "value", + }, + backoffPlan: { + type: { + key: "value", }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - model: { model: "claude-3-opus-20240229", provider: "anthropic" }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", + }, + }, + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", + }, + model: { + messages: [ + { + content: null, + role: "assistant", + }, ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], - observabilityPlan: { provider: "langfuse", tags: ["tags"] }, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], - "tools:append": [ + tools: [ { type: "apiRequest", method: "POST", timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, }, ], - variableValues: { key: "value" }, - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - type: "stay-on-line", - waitSeconds: 3, }, }, - metadata: { key: "value" }, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { + type: "enabled", + budgetTokens: 1.1, }, - startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + metadata: { + key: "value", }, }, - }, - workflowId: "workflowId", - workflow: { - nodes: [ + credentials: [ { - type: "conversation", - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - name: "name", + provider: "11labs", + apiKey: "apiKey", }, ], - model: { provider: "openai", model: "gpt-5", temperature: 1.1, maxTokens: 1.1 }, - transcriber: { - provider: "assembly-ai", - language: "en", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - realtimeUrl: "realtimeUrl", - wordBoost: ["wordBoost"], - keytermsPrompt: ["keytermsPrompt"], - endUtteranceSilenceThreshold: 1.1, - disablePartialTranscripts: true, - fallbackPlan: { - transcribers: [ + hooks: [ + { + on: "call.ending", + do: [ { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, + type: "tool", }, ], }, + ], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + variableValues: { + key: "value", }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, - speed: 1.1, - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, - backgroundSound: "off", - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, - maxDurationSeconds: 600, name: "name", - edges: [{ from: "from", to: "to" }], - globalPrompt: "globalPrompt", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], compliancePlan: { hipaaEnabled: true, pciEnabled: true, @@ -5351,15 +9755,40 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, }, type: "stay-on-line", waitSeconds: 3, }, }, + metadata: { + key: "value", + }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, analysisPlan: { minMessagesThreshold: 1.1, - structuredDataMultiPlan: [{ key: "key", plan: {} }], + structuredDataMultiPlan: [ + { + key: "key", + plan: {}, + }, + ], outcomeIds: ["outcomeIds"], }, artifactPlan: { @@ -5373,15 +9802,40 @@ describe("Calls", () => { pcapUseCustomStorageEnabled: true, loggingEnabled: true, loggingUseCustomStorageEnabled: true, - transcriptPlan: { enabled: true }, + transcriptPlan: { + enabled: true, + }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { waitSeconds: 0.4, - smartEndpointingPlan: { provider: "vapi" }, - customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + smartEndpointingPlan: { + provider: "vapi", + }, + customEndpointingRules: [ + { + type: "assistant", + regex: "regex", + timeoutSeconds: 1.1, + }, + ], transcriptionEndpointingPlan: { onPunctuationSeconds: 0.1, onNoPunctuationSeconds: 1.5, @@ -5445,56 +9899,48 @@ describe("Calls", () => { controlEnabled: false, controlAuthenticationEnabled: false, }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, - }, - }, credentialIds: ["credentialIds"], - keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, - voicemailMessage: "voicemailMessage", - }, - workflowOverrides: { variableValues: { key: "value" } }, - phoneNumberId: "phoneNumberId", - phoneNumber: { - fallbackDestination: { - message: "message", - type: "number", - numberE164CheckEnabled: true, - number: "number", - extension: "extension", - callerId: "callerId", - transferPlan: { mode: "blind-transfer" }, - description: "description", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { + key: "value", + }, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, }, - hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }], - smsEnabled: true, - twilioPhoneNumber: "twilioPhoneNumber", - twilioAccountSid: "twilioAccountSid", - twilioAuthToken: "twilioAuthToken", - twilioApiKey: "twilioApiKey", - twilioApiSecret: "twilioApiSecret", - name: "name", - assistantId: "assistantId", - workflowId: "workflowId", - squadId: "squadId", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", }, }, - customerId: "customerId", - customer: { - numberE164CheckEnabled: true, - extension: "extension", - assistantOverrides: { + squadId: "squadId", + squad: { + name: "name", + members: [{}], + membersOverrides: { transcriber: { provider: "assembly-ai", confidenceThreshold: 0.4, @@ -5515,17 +9961,28 @@ describe("Calls", () => { ], }, }, - model: { model: "claude-3-opus-20240229", provider: "anthropic" }, + model: { + model: "claude-3-opus-20240229", + provider: "anthropic", + }, voice: { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -5539,6 +9996,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -5551,14 +10009,38 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, - transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], - observabilityPlan: { provider: "langfuse", tags: ["tags"] }, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + }, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + hooks: [ + { + on: "call.ending", + do: [ + { + type: "tool", + }, + ], + }, + ], "tools:append": [ { type: "apiRequest", @@ -5566,244 +10048,162 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - ], - variableValues: { key: "value" }, - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], + backoffPlan: { + type: { + key: "value", }, - }, - type: "stay-on-line", - waitSeconds: 3, - }, - }, - metadata: { key: "value" }, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - }, - startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - }, - number: "number", - sipUri: "sipUri", - name: "name", - email: "email", - externalId: "externalId", - }, - name: "name", - schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" }, - transport: { key: "value" }, - }; - server.mockEndpoint().get("/call/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - - const response = await client.calls.get("id"); - expect(response).toEqual({ - type: "inboundPhoneCall", - costs: [ - { - type: "transport", - provider: "daily", - minutes: 1.1, - cost: 1.1, - }, - ], - messages: [ - { - role: "role", - message: "message", - time: 1.1, - endTime: 1.1, - secondsFromStart: 1.1, - duration: 1.1, - isFiltered: true, - detectedThreats: ["detectedThreats"], - originalMessage: "originalMessage", - metadata: { - key: "value", - }, - }, - ], - phoneCallTransport: "sip", - status: "scheduled", - endedReason: "call-start-error-neither-assistant-nor-server-set", - destination: { - message: "message", - type: "number", - numberE164CheckEnabled: true, - number: "number", - extension: "extension", - callerId: "callerId", - transferPlan: { - mode: "blind-transfer", - message: "message", - timeout: 1.1, - sipVerb: { - key: "value", - }, - holdAudioUrl: "holdAudioUrl", - transferCompleteAudioUrl: "transferCompleteAudioUrl", - twiml: "twiml", - sipHeadersInReferToEnabled: true, - fallbackPlan: { - message: "message", - }, - }, - description: "description", - }, - id: "id", - orgId: "orgId", - createdAt: "2024-01-15T09:30:00Z", - updatedAt: "2024-01-15T09:30:00Z", - startedAt: "2024-01-15T09:30:00Z", - endedAt: "2024-01-15T09:30:00Z", - cost: 1.1, - costBreakdown: { - transport: 1.1, - stt: 1.1, - llm: 1.1, - tts: 1.1, - vapi: 1.1, - chat: 1.1, - total: 1.1, - llmPromptTokens: 1.1, - llmCompletionTokens: 1.1, - ttsCharacters: 1.1, - analysisCostBreakdown: { - summary: 1.1, - summaryPromptTokens: 1.1, - summaryCompletionTokens: 1.1, - structuredData: 1.1, - structuredDataPromptTokens: 1.1, - structuredDataCompletionTokens: 1.1, - successEvaluation: 1.1, - successEvaluationPromptTokens: 1.1, - successEvaluationCompletionTokens: 1.1, - structuredOutput: 1.1, - structuredOutputPromptTokens: 1.1, - structuredOutputCompletionTokens: 1.1, - }, - }, - artifactPlan: { - recordingEnabled: true, - recordingFormat: "wav;l16", - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - transcriptPlan: { - enabled: true, - assistantName: "assistantName", - userName: "userName", - }, - recordingPath: "recordingPath", - structuredOutputIds: ["structuredOutputIds"], - loggingPath: "loggingPath", - }, - analysis: { - summary: "summary", - structuredData: { - key: "value", - }, - structuredDataMulti: [ - { + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + variableValues: { key: "value", }, - ], - successEvaluation: "successEvaluation", - }, - monitor: { - listenUrl: "listenUrl", - controlUrl: "controlUrl", - }, - artifact: { - messages: [ - { - role: "role", - message: "message", - time: 1.1, - endTime: 1.1, - secondsFromStart: 1.1, - }, - ], - messagesOpenAIFormatted: [ - { - content: undefined, - role: "assistant", + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, }, - ], - recording: { - stereoUrl: "stereoUrl", - videoUrl: "videoUrl", - videoRecordingStartDelaySeconds: 1.1, - }, - transcript: "transcript", - pcapUrl: "pcapUrl", - logUrl: "logUrl", - nodes: [{}], - variableValues: { - key: "value", - }, - performanceMetrics: { - turnLatencies: [{}], - modelLatencyAverage: 1.1, - voiceLatencyAverage: 1.1, - transcriberLatencyAverage: 1.1, - endpointingLatencyAverage: 1.1, - turnLatencyAverage: 1.1, - }, - structuredOutputs: { - key: "value", - }, - transfers: ["transfers"], - }, - compliance: { - recordingConsent: { - type: { + metadata: { key: "value", }, - grantedAt: "2024-01-15T09:30:00Z", + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { + waitSeconds: 0.4, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, }, }, - campaignId: "campaignId", - assistantId: "assistantId", - assistant: { + squadOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -5833,7 +10233,7 @@ describe("Calls", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -5850,6 +10250,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -5859,12 +10273,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -5886,6 +10315,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -5901,11 +10346,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -5919,6 +10360,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -5931,9 +10373,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -5965,6 +10408,39 @@ describe("Calls", () => { ], }, ], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + variableValues: { + key: "value", + }, name: "name", voicemailMessage: "voicemailMessage", endCallMessage: "endCallMessage", @@ -6031,6 +10507,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -6112,6 +10603,7 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -6122,6 +10614,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -6129,8 +10635,55 @@ describe("Calls", () => { timeoutSeconds: 1.1, delimiters: "#", }, - }, - assistantOverrides: { + }, + workflowId: "workflowId", + workflow: { + nodes: [ + { + type: "conversation", + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + name: "name", + }, + ], + model: { + provider: "openai", + model: "gpt-5.1", + temperature: 1.1, + maxTokens: 1.1, + }, transcriber: { provider: "assembly-ai", language: "en", @@ -6157,55 +10710,6 @@ describe("Calls", () => { ], }, }, - model: { - messages: [ - { - content: undefined, - role: "assistant", - }, - ], - tools: [ - { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { - type: { - key: "value", - }, - maxRetries: 0, - baseDelaySeconds: 1, - }, - }, - ], - toolIds: ["toolIds"], - knowledgeBase: { - provider: "custom-knowledge-base", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { - type: { - key: "value", - }, - maxRetries: 0, - baseDelaySeconds: 1, - }, - }, - }, - model: "claude-3-opus-20240229", - provider: "anthropic", - thinking: { - type: "enabled", - budgetTokens: 1.1, - }, - temperature: 1.1, - maxTokens: 1.1, - emotionRecognitionEnabled: true, - numFastTurns: 1.1, - }, voice: { cachingEnabled: true, provider: "azure", @@ -6213,6 +10717,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -6225,50 +10745,6 @@ describe("Calls", () => { ], }, }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", - ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [ - { - provider: "twilio", - timeout: 60, - record: false, - }, - ], observabilityPlan: { provider: "langfuse", tags: ["tags"], @@ -6276,12 +10752,7 @@ describe("Calls", () => { key: "value", }, }, - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", - }, - ], + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", hooks: [ { on: "call.ending", @@ -6292,29 +10763,52 @@ describe("Calls", () => { ], }, ], - "tools:append": [ + credentials: [ { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { - type: { + provider: "11labs", + apiKey: "apiKey", + }, + ], + voicemailDetection: "off", + maxDurationSeconds: 600, + name: "name", + edges: [ + { + from: "from", + to: "to", + }, + ], + globalPrompt: "globalPrompt", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { + key: "value", + }, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value", }, - maxRetries: 0, - baseDelaySeconds: 1, - }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - ], - variableValues: { - key: "value", }, - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], compliancePlan: { hipaaEnabled: true, pciEnabled: true, @@ -6339,18 +10833,6 @@ describe("Calls", () => { waitSeconds: 3, }, }, - metadata: { - key: "value", - }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, - }, - }, analysisPlan: { minMessagesThreshold: 1.1, structuredDataMultiPlan: [ @@ -6377,6 +10859,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -6454,10 +10951,66 @@ describe("Calls", () => { controlEnabled: false, controlAuthenticationEnabled: false, }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, credentialIds: ["credentialIds"], + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", + }, + voicemailMessage: "voicemailMessage", + }, + workflowOverrides: { + variableValues: { + key: "value", + }, + }, + phoneNumberId: "phoneNumberId", + phoneNumber: { + fallbackDestination: { + message: "message", + type: "number", + numberE164CheckEnabled: true, + number: "number", + extension: "extension", + callerId: "callerId", + transferPlan: { + mode: "blind-transfer", + }, + description: "description", + }, + hooks: [ + { + on: "call.ringing", + do: [ + { + type: "transfer", + }, + ], + }, + ], + smsEnabled: true, + twilioPhoneNumber: "twilioPhoneNumber", + twilioAccountSid: "twilioAccountSid", + twilioAuthToken: "twilioAuthToken", + twilioApiKey: "twilioApiKey", + twilioApiSecret: "twilioApiSecret", + name: "name", + assistantId: "assistantId", + workflowId: "workflowId", + squadId: "squadId", server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -6468,19 +11021,28 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, - }, - }, - keypadInputPlan: { - enabled: true, - timeoutSeconds: 1.1, - delimiters: "#", + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, }, }, - squadId: "squadId", - squad: { - name: "name", - members: [{}], - membersOverrides: { + customerId: "customerId", + customer: { + numberE164CheckEnabled: true, + extension: "extension", + assistantOverrides: { transcriber: { provider: "assembly-ai", confidenceThreshold: 0.4, @@ -6522,9 +11084,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -6538,6 +11098,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -6550,9 +11111,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -6594,6 +11156,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -6647,6 +11223,52 @@ describe("Calls", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -6658,64 +11280,464 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, + number: "number", + sipUri: "sipUri", + name: "name", + email: "email", + externalId: "externalId", }, - workflowId: "workflowId", - workflow: { - nodes: [ - { - type: "conversation", - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, + name: "name", + schedulePlan: { + earliestAt: "2024-01-15T09:30:00Z", + latestAt: "2024-01-15T09:30:00Z", + }, + transport: { + key: "value", + }, + }); + }); + + test("delete", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + type: "inboundPhoneCall", + costs: [{ type: "transport", provider: "daily", minutes: 1.1, cost: 1.1 }], + messages: [ + { + role: "role", + message: "message", + time: 1.1, + endTime: 1.1, + secondsFromStart: 1.1, + duration: 1.1, + isFiltered: true, + detectedThreats: ["detectedThreats"], + originalMessage: "originalMessage", + metadata: { key: "value" }, + }, + ], + phoneCallTransport: "sip", + status: "scheduled", + endedReason: "call-start-error-neither-assistant-nor-server-set", + destination: { + message: "message", + type: "number", + numberE164CheckEnabled: true, + number: "number", + extension: "extension", + callerId: "callerId", + transferPlan: { + mode: "blind-transfer", + message: "message", + timeout: 1.1, + sipVerb: { key: "value" }, + dialTimeout: 1.1, + holdAudioUrl: "holdAudioUrl", + transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 }, + twiml: "twiml", + sipHeadersInReferToEnabled: true, + fallbackPlan: { message: "message" }, + }, + description: "description", + }, + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + startedAt: "2024-01-15T09:30:00Z", + endedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costBreakdown: { + transport: 1.1, + stt: 1.1, + llm: 1.1, + tts: 1.1, + vapi: 1.1, + chat: 1.1, + total: 1.1, + llmPromptTokens: 1.1, + llmCompletionTokens: 1.1, + ttsCharacters: 1.1, + analysisCostBreakdown: { + summary: 1.1, + summaryPromptTokens: 1.1, + summaryCompletionTokens: 1.1, + structuredData: 1.1, + structuredDataPromptTokens: 1.1, + structuredDataCompletionTokens: 1.1, + successEvaluation: 1.1, + successEvaluationPromptTokens: 1.1, + successEvaluationCompletionTokens: 1.1, + structuredOutput: 1.1, + structuredOutputPromptTokens: 1.1, + structuredOutputCompletionTokens: 1.1, + }, + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + analysis: { + summary: "summary", + structuredData: { key: "value" }, + structuredDataMulti: [{ key: "value" }], + successEvaluation: "successEvaluation", + }, + monitor: { listenUrl: "listenUrl", controlUrl: "controlUrl" }, + artifact: { + messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], + recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, + transcript: "transcript", + pcapUrl: "pcapUrl", + logUrl: "logUrl", + nodes: [{}], + variableValues: { key: "value" }, + performanceMetrics: { + turnLatencies: [{}], + modelLatencyAverage: 1.1, + voiceLatencyAverage: 1.1, + transcriberLatencyAverage: 1.1, + endpointingLatencyAverage: 1.1, + turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, + }, + structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, + transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", + }, + compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } }, + campaignId: "campaignId", + assistantId: "assistantId", + assistant: { + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + messages: [{ content: null, role: "assistant" }], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, ], }, }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { type: "enabled", budgetTokens: 1.1 }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", voice: { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, - name: "name", + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [{ key: "key", plan: {} }], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], }, - ], - model: { - provider: "openai", - model: "gpt-5", - temperature: 1.1, - maxTokens: 1.1, }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + }, + assistantOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -6742,6 +11764,56 @@ describe("Calls", () => { ], }, }, + model: { + messages: [{ content: null, role: "assistant" }], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { type: "enabled", budgetTokens: 1.1 }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, voice: { cachingEnabled: true, provider: "azure", @@ -6749,71 +11821,90 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, - }, - speed: 1.1, - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - observabilityPlan: { - provider: "langfuse", - tags: ["tags"], - metadata: { - key: "value", - }, - }, - backgroundSound: "off", - hooks: [ - { - on: "call.ending", - do: [ - { - type: "tool", - }, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", ], }, - ], - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", - }, - ], - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", + speed: 1.1, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - name: "name", - edges: [ + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ { - from: "from", - to: "to", - }, - ], - globalPrompt: "globalPrompt", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { - key: "value", - }, - backoffPlan: { - type: { - key: "value", + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], }, - maxRetries: 0, - baseDelaySeconds: 1, }, - }, + ], + variableValues: { key: "value" }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], compliancePlan: { hipaaEnabled: true, pciEnabled: true, @@ -6824,28 +11915,25 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, type: "stay-on-line", waitSeconds: 3, }, }, + metadata: { key: "value" }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, analysisPlan: { minMessagesThreshold: 1.1, - structuredDataMultiPlan: [ - { - key: "key", - plan: {}, - }, - ], + structuredDataMultiPlan: [{ key: "key", plan: {} }], outcomeIds: ["outcomeIds"], }, artifactPlan: { @@ -6859,25 +11947,19 @@ describe("Calls", () => { pcapUseCustomStorageEnabled: true, loggingEnabled: true, loggingUseCustomStorageEnabled: true, - transcriptPlan: { - enabled: true, - }, + transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { waitSeconds: 0.4, - smartEndpointingPlan: { - provider: "vapi", - }, - customEndpointingRules: [ - { - type: "assistant", - regex: "regex", - timeoutSeconds: 1.1, - }, - ], + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], transcriptionEndpointingPlan: { onPunctuationSeconds: 0.1, onNoPunctuationSeconds: 1.5, @@ -6941,83 +12023,27 @@ describe("Calls", () => { controlEnabled: false, controlAuthenticationEnabled: false, }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, - }, - }, credentialIds: ["credentialIds"], - keypadInputPlan: { - enabled: true, - timeoutSeconds: 1.1, - delimiters: "#", - }, - voicemailMessage: "voicemailMessage", - }, - workflowOverrides: { - variableValues: { - key: "value", - }, - }, - phoneNumberId: "phoneNumberId", - phoneNumber: { - fallbackDestination: { - message: "message", - type: "number", - numberE164CheckEnabled: true, - number: "number", - extension: "extension", - callerId: "callerId", - transferPlan: { - mode: "blind-transfer", - }, - description: "description", - }, - hooks: [ - { - on: "call.ringing", - do: [ - { - type: "transfer", - }, - ], - }, - ], - smsEnabled: true, - twilioPhoneNumber: "twilioPhoneNumber", - twilioAccountSid: "twilioAccountSid", - twilioAuthToken: "twilioAuthToken", - twilioApiKey: "twilioApiKey", - twilioApiSecret: "twilioApiSecret", - name: "name", - assistantId: "assistantId", - workflowId: "workflowId", - squadId: "squadId", server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", - headers: { - key: "value", - }, + headers: { key: "value" }, backoffPlan: { - type: { - key: "value", - }, + type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], }, }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, - customerId: "customerId", - customer: { - numberE164CheckEnabled: true, - extension: "extension", - assistantOverrides: { + squadId: "squadId", + squad: { + name: "name", + members: [{}], + membersOverrides: { transcriber: { provider: "assembly-ai", confidenceThreshold: 0.4, @@ -7038,30 +12064,17 @@ describe("Calls", () => { ], }, }, - model: { - model: "claude-3-opus-20240229", - provider: "anthropic", - }, + model: { model: "claude-3-opus-20240229", provider: "anthropic" }, voice: { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -7075,6 +12088,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -7087,37 +12101,15 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, - transportConfigurations: [ - { - provider: "twilio", - timeout: 60, - record: false, - }, - ], - observabilityPlan: { - provider: "langfuse", - tags: ["tags"], - }, - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", - }, - ], - hooks: [ - { - on: "call.ending", - do: [ - { - type: "tool", - }, - ], - }, - ], + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"] }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], "tools:append": [ { type: "apiRequest", @@ -7126,17 +12118,19 @@ describe("Calls", () => { credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", backoffPlan: { - type: { - key: "value", - }, + type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], }, }, ], - variableValues: { - key: "value", - }, + variableValues: { key: "value" }, name: "name", voicemailMessage: "voicemailMessage", endCallMessage: "endCallMessage", @@ -7146,26 +12140,18 @@ describe("Calls", () => { message: "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], }, }, type: "stay-on-line", waitSeconds: 3, }, }, - metadata: { - key: "value", - }, + metadata: { key: "value" }, artifactPlan: { recordingEnabled: true, recordingUseCustomStorageEnabled: true, @@ -7177,13 +12163,57 @@ describe("Calls", () => { loggingEnabled: true, loggingUseCustomStorageEnabled: true, }, - startSpeakingPlan: { - waitSeconds: 0.4, - }, + startSpeakingPlan: { waitSeconds: 0.4 }, stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -7195,156 +12225,22 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { - type: { - key: "value", - }, + type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], }, }, }, - number: "number", - sipUri: "sipUri", - name: "name", - email: "email", - externalId: "externalId", - }, - name: "name", - schedulePlan: { - earliestAt: "2024-01-15T09:30:00Z", - latestAt: "2024-01-15T09:30:00Z", - }, - transport: { - key: "value", - }, - }); - }); - - test("delete", async () => { - const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { - type: "inboundPhoneCall", - costs: [{ type: "transport", provider: "daily", minutes: 1.1, cost: 1.1 }], - messages: [ - { - role: "role", - message: "message", - time: 1.1, - endTime: 1.1, - secondsFromStart: 1.1, - duration: 1.1, - isFiltered: true, - detectedThreats: ["detectedThreats"], - originalMessage: "originalMessage", - metadata: { key: "value" }, - }, - ], - phoneCallTransport: "sip", - status: "scheduled", - endedReason: "call-start-error-neither-assistant-nor-server-set", - destination: { - message: "message", - type: "number", - numberE164CheckEnabled: true, - number: "number", - extension: "extension", - callerId: "callerId", - transferPlan: { - mode: "blind-transfer", - message: "message", - timeout: 1.1, - sipVerb: { key: "value" }, - holdAudioUrl: "holdAudioUrl", - transferCompleteAudioUrl: "transferCompleteAudioUrl", - twiml: "twiml", - sipHeadersInReferToEnabled: true, - fallbackPlan: { message: "message" }, - }, - description: "description", - }, - id: "id", - orgId: "orgId", - createdAt: "2024-01-15T09:30:00Z", - updatedAt: "2024-01-15T09:30:00Z", - startedAt: "2024-01-15T09:30:00Z", - endedAt: "2024-01-15T09:30:00Z", - cost: 1.1, - costBreakdown: { - transport: 1.1, - stt: 1.1, - llm: 1.1, - tts: 1.1, - vapi: 1.1, - chat: 1.1, - total: 1.1, - llmPromptTokens: 1.1, - llmCompletionTokens: 1.1, - ttsCharacters: 1.1, - analysisCostBreakdown: { - summary: 1.1, - summaryPromptTokens: 1.1, - summaryCompletionTokens: 1.1, - structuredData: 1.1, - structuredDataPromptTokens: 1.1, - structuredDataCompletionTokens: 1.1, - successEvaluation: 1.1, - successEvaluationPromptTokens: 1.1, - successEvaluationCompletionTokens: 1.1, - structuredOutput: 1.1, - structuredOutputPromptTokens: 1.1, - structuredOutputCompletionTokens: 1.1, - }, - }, - artifactPlan: { - recordingEnabled: true, - recordingFormat: "wav;l16", - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, - recordingPath: "recordingPath", - structuredOutputIds: ["structuredOutputIds"], - loggingPath: "loggingPath", - }, - analysis: { - summary: "summary", - structuredData: { key: "value" }, - structuredDataMulti: [{ key: "value" }], - successEvaluation: "successEvaluation", - }, - monitor: { listenUrl: "listenUrl", controlUrl: "controlUrl" }, - artifact: { - messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], - recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, - transcript: "transcript", - pcapUrl: "pcapUrl", - logUrl: "logUrl", - nodes: [{}], - variableValues: { key: "value" }, - performanceMetrics: { - turnLatencies: [{}], - modelLatencyAverage: 1.1, - voiceLatencyAverage: 1.1, - transcriberLatencyAverage: 1.1, - endpointingLatencyAverage: 1.1, - turnLatencyAverage: 1.1, - }, - structuredOutputs: { key: "value" }, - transfers: ["transfers"], }, - compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } }, - campaignId: "campaignId", - assistantId: "assistantId", - assistant: { + squadOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -7372,7 +12268,7 @@ describe("Calls", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -7380,7 +12276,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -7389,7 +12295,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -7404,14 +12321,33 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -7425,6 +12361,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -7437,14 +12374,36 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, credentials: [{ provider: "11labs", apiKey: "apiKey" }], hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + variableValues: { key: "value" }, name: "name", voicemailMessage: "voicemailMessage", endCallMessage: "endCallMessage", @@ -7494,6 +12453,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -7567,13 +12530,53 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, - assistantOverrides: { + workflowId: "workflowId", + workflow: { + nodes: [ + { + type: "conversation", + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + name: "name", + }, + ], + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, transcriber: { provider: "assembly-ai", language: "en", @@ -7600,95 +12603,55 @@ describe("Calls", () => { ], }, }, - model: { - messages: [{ content: undefined, role: "assistant" }], - tools: [ - { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - ], - toolIds: ["toolIds"], - knowledgeBase: { - provider: "custom-knowledge-base", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - }, - model: "claude-3-opus-20240229", - provider: "anthropic", - thinking: { type: "enabled", budgetTokens: 1.1 }, - temperature: 1.1, - maxTokens: 1.1, - emotionRecognitionEnabled: true, - numFastTurns: 1.1, - }, voice: { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", - ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], - "tools:append": [ - { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - ], - variableValues: { key: "value" }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + voicemailDetection: "off", + maxDurationSeconds: 600, name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], + edges: [{ from: "from", to: "to" }], + globalPrompt: "globalPrompt", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, + }, compliancePlan: { hipaaEnabled: true, pciEnabled: true, @@ -7705,16 +12668,6 @@ describe("Calls", () => { waitSeconds: 3, }, }, - metadata: { key: "value" }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, - }, - }, analysisPlan: { minMessagesThreshold: 1.1, structuredDataMultiPlan: [{ key: "key", plan: {} }], @@ -7734,6 +12687,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -7803,21 +12760,62 @@ describe("Calls", () => { controlEnabled: false, controlAuthenticationEnabled: false, }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, credentialIds: ["credentialIds"], + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + voicemailMessage: "voicemailMessage", + }, + workflowOverrides: { variableValues: { key: "value" } }, + phoneNumberId: "phoneNumberId", + phoneNumber: { + fallbackDestination: { + message: "message", + type: "number", + numberE164CheckEnabled: true, + number: "number", + extension: "extension", + callerId: "callerId", + transferPlan: { mode: "blind-transfer" }, + description: "description", + }, + hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }], + smsEnabled: true, + twilioPhoneNumber: "twilioPhoneNumber", + twilioAccountSid: "twilioAccountSid", + twilioAuthToken: "twilioAuthToken", + twilioApiKey: "twilioApiKey", + twilioApiSecret: "twilioApiSecret", + name: "name", + assistantId: "assistantId", + workflowId: "workflowId", + squadId: "squadId", server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, - keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, - squadId: "squadId", - squad: { - name: "name", - members: [{}], - membersOverrides: { + customerId: "customerId", + customer: { + numberE164CheckEnabled: true, + extension: "extension", + assistantOverrides: { transcriber: { provider: "assembly-ai", confidenceThreshold: 0.4, @@ -7848,7 +12846,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -7862,6 +12860,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -7874,9 +12873,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -7889,7 +12889,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -7926,7 +12936,57 @@ describe("Calls", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -7937,45 +12997,244 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, + number: "number", + sipUri: "sipUri", + name: "name", + email: "email", + externalId: "externalId", + }, + name: "name", + schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" }, + transport: { key: "value" }, + }; + server + .mockEndpoint() + .delete("/call/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.calls.delete({ + id: "id", + }); + expect(response).toEqual({ + type: "inboundPhoneCall", + costs: [ + { + type: "transport", + provider: "daily", + minutes: 1.1, + cost: 1.1, + }, + ], + messages: [ + { + role: "role", + message: "message", + time: 1.1, + endTime: 1.1, + secondsFromStart: 1.1, + duration: 1.1, + isFiltered: true, + detectedThreats: ["detectedThreats"], + originalMessage: "originalMessage", + metadata: { + key: "value", + }, + }, + ], + phoneCallTransport: "sip", + status: "scheduled", + endedReason: "call-start-error-neither-assistant-nor-server-set", + destination: { + message: "message", + type: "number", + numberE164CheckEnabled: true, + number: "number", + extension: "extension", + callerId: "callerId", + transferPlan: { + mode: "blind-transfer", + message: "message", + timeout: 1.1, + sipVerb: { + key: "value", + }, + dialTimeout: 1.1, + holdAudioUrl: "holdAudioUrl", + transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { + type: "lastNMessages", + maxMessages: 1.1, + }, + twiml: "twiml", + sipHeadersInReferToEnabled: true, + fallbackPlan: { + message: "message", }, }, - }, - workflowId: "workflowId", - workflow: { - nodes: [ + description: "description", + }, + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + startedAt: "2024-01-15T09:30:00Z", + endedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costBreakdown: { + transport: 1.1, + stt: 1.1, + llm: 1.1, + tts: 1.1, + vapi: 1.1, + chat: 1.1, + total: 1.1, + llmPromptTokens: 1.1, + llmCompletionTokens: 1.1, + ttsCharacters: 1.1, + analysisCostBreakdown: { + summary: 1.1, + summaryPromptTokens: 1.1, + summaryCompletionTokens: 1.1, + structuredData: 1.1, + structuredDataPromptTokens: 1.1, + structuredDataCompletionTokens: 1.1, + successEvaluation: 1.1, + successEvaluationPromptTokens: 1.1, + successEvaluationCompletionTokens: 1.1, + structuredOutput: 1.1, + structuredOutputPromptTokens: 1.1, + structuredOutputCompletionTokens: 1.1, + }, + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { + enabled: true, + assistantName: "assistantName", + userName: "userName", + }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ { - type: "conversation", - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, + key: "value", }, ], }, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - name: "name", + ], + }, + ], + loggingPath: "loggingPath", + }, + analysis: { + summary: "summary", + structuredData: { + key: "value", + }, + structuredDataMulti: [ + { + key: "value", + }, + ], + successEvaluation: "successEvaluation", + }, + monitor: { + listenUrl: "listenUrl", + controlUrl: "controlUrl", + }, + artifact: { + messages: [ + { + role: "role", + message: "message", + time: 1.1, + endTime: 1.1, + secondsFromStart: 1.1, + }, + ], + messagesOpenAIFormatted: [ + { + content: null, + role: "assistant", }, ], - model: { provider: "openai", model: "gpt-5", temperature: 1.1, maxTokens: 1.1 }, + recording: { + stereoUrl: "stereoUrl", + videoUrl: "videoUrl", + videoRecordingStartDelaySeconds: 1.1, + }, + transcript: "transcript", + pcapUrl: "pcapUrl", + logUrl: "logUrl", + nodes: [{}], + variableValues: { + key: "value", + }, + performanceMetrics: { + turnLatencies: [{}], + modelLatencyAverage: 1.1, + voiceLatencyAverage: 1.1, + transcriberLatencyAverage: 1.1, + endpointingLatencyAverage: 1.1, + turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, + }, + structuredOutputs: { + key: "value", + }, + scorecards: { + key: "value", + }, + transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", + }, + compliance: { + recordingConsent: { + type: { + key: "value", + }, + grantedAt: "2024-01-15T09:30:00Z", + }, + }, + campaignId: "campaignId", + assistantId: "assistantId", + assistant: { transcriber: { provider: "assembly-ai", language: "en", @@ -8001,31 +13260,189 @@ describe("Calls", () => { }, ], }, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, - speed: 1.1, - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, - backgroundSound: "off", - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, - maxDurationSeconds: 600, + }, + model: { + messages: [ + { + content: null, + role: "assistant", + }, + ], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { + type: "enabled", + budgetTokens: 1.1, + }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + metadata: { + key: "value", + }, + }, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + hooks: [ + { + on: "call.ending", + do: [ + { + type: "tool", + }, + ], + }, + ], name: "name", - edges: [{ from: "from", to: "to" }], - globalPrompt: "globalPrompt", - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], compliancePlan: { hipaaEnabled: true, pciEnabled: true, @@ -8036,15 +13453,40 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, }, type: "stay-on-line", waitSeconds: 3, }, }, + metadata: { + key: "value", + }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, analysisPlan: { minMessagesThreshold: 1.1, - structuredDataMultiPlan: [{ key: "key", plan: {} }], + structuredDataMultiPlan: [ + { + key: "key", + plan: {}, + }, + ], outcomeIds: ["outcomeIds"], }, artifactPlan: { @@ -8058,15 +13500,40 @@ describe("Calls", () => { pcapUseCustomStorageEnabled: true, loggingEnabled: true, loggingUseCustomStorageEnabled: true, - transcriptPlan: { enabled: true }, + transcriptPlan: { + enabled: true, + }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { waitSeconds: 0.4, - smartEndpointingPlan: { provider: "vapi" }, - customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + smartEndpointingPlan: { + provider: "vapi", + }, + customEndpointingRules: [ + { + type: "assistant", + regex: "regex", + timeoutSeconds: 1.1, + }, + ], transcriptionEndpointingPlan: { onPunctuationSeconds: 0.1, onNoPunctuationSeconds: 1.5, @@ -8130,699 +13597,744 @@ describe("Calls", () => { controlEnabled: false, controlAuthenticationEnabled: false, }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, - }, - }, credentialIds: ["credentialIds"], - keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, - voicemailMessage: "voicemailMessage", - }, - workflowOverrides: { variableValues: { key: "value" } }, - phoneNumberId: "phoneNumberId", - phoneNumber: { - fallbackDestination: { - message: "message", - type: "number", - numberE164CheckEnabled: true, - number: "number", - extension: "extension", - callerId: "callerId", - transferPlan: { mode: "blind-transfer" }, - description: "description", - }, - hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }], - smsEnabled: true, - twilioPhoneNumber: "twilioPhoneNumber", - twilioAccountSid: "twilioAccountSid", - twilioAuthToken: "twilioAuthToken", - twilioApiKey: "twilioApiKey", - twilioApiSecret: "twilioApiSecret", - name: "name", - assistantId: "assistantId", - workflowId: "workflowId", - squadId: "squadId", server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - }, - customerId: "customerId", - customer: { - numberE164CheckEnabled: true, - extension: "extension", - assistantOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], + headers: { + key: "value", + }, + backoffPlan: { + type: { + key: "value", }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - model: { model: "claude-3-opus-20240229", provider: "anthropic" }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", + }, + }, + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", + }, + model: { + messages: [ + { + content: null, + role: "assistant", + }, ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], - observabilityPlan: { provider: "langfuse", tags: ["tags"] }, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], - "tools:append": [ + tools: [ { type: "apiRequest", method: "POST", timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, }, ], - variableValues: { key: "value" }, - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - type: "stay-on-line", - waitSeconds: 3, }, }, - metadata: { key: "value" }, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - }, - startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - }, - number: "number", - sipUri: "sipUri", - name: "name", - email: "email", - externalId: "externalId", - }, - name: "name", - schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" }, - transport: { key: "value" }, - }; - server - .mockEndpoint() - .delete("/call/id") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.calls.delete("id"); - expect(response).toEqual({ - type: "inboundPhoneCall", - costs: [ - { - type: "transport", - provider: "daily", - minutes: 1.1, - cost: 1.1, - }, - ], - messages: [ - { - role: "role", - message: "message", - time: 1.1, - endTime: 1.1, - secondsFromStart: 1.1, - duration: 1.1, - isFiltered: true, - detectedThreats: ["detectedThreats"], - originalMessage: "originalMessage", - metadata: { - key: "value", + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { + type: "enabled", + budgetTokens: 1.1, }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, }, - ], - phoneCallTransport: "sip", - status: "scheduled", - endedReason: "call-start-error-neither-assistant-nor-server-set", - destination: { - message: "message", - type: "number", - numberE164CheckEnabled: true, - number: "number", - extension: "extension", - callerId: "callerId", - transferPlan: { - mode: "blind-transfer", - message: "message", - timeout: 1.1, - sipVerb: { - key: "value", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, - holdAudioUrl: "holdAudioUrl", - transferCompleteAudioUrl: "transferCompleteAudioUrl", - twiml: "twiml", - sipHeadersInReferToEnabled: true, + speed: 1.1, fallbackPlan: { - message: "message", + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], }, }, - description: "description", - }, - id: "id", - orgId: "orgId", - createdAt: "2024-01-15T09:30:00Z", - updatedAt: "2024-01-15T09:30:00Z", - startedAt: "2024-01-15T09:30:00Z", - endedAt: "2024-01-15T09:30:00Z", - cost: 1.1, - costBreakdown: { - transport: 1.1, - stt: 1.1, - llm: 1.1, - tts: 1.1, - vapi: 1.1, - chat: 1.1, - total: 1.1, - llmPromptTokens: 1.1, - llmCompletionTokens: 1.1, - ttsCharacters: 1.1, - analysisCostBreakdown: { - summary: 1.1, - summaryPromptTokens: 1.1, - summaryCompletionTokens: 1.1, - structuredData: 1.1, - structuredDataPromptTokens: 1.1, - structuredDataCompletionTokens: 1.1, - successEvaluation: 1.1, - successEvaluationPromptTokens: 1.1, - successEvaluationCompletionTokens: 1.1, - structuredOutput: 1.1, - structuredOutputPromptTokens: 1.1, - structuredOutputCompletionTokens: 1.1, - }, - }, - artifactPlan: { - recordingEnabled: true, - recordingFormat: "wav;l16", - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - transcriptPlan: { - enabled: true, - assistantName: "assistantName", - userName: "userName", - }, - recordingPath: "recordingPath", - structuredOutputIds: ["structuredOutputIds"], - loggingPath: "loggingPath", - }, - analysis: { - summary: "summary", - structuredData: { - key: "value", + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + metadata: { + key: "value", + }, }, - structuredDataMulti: [ + credentials: [ { - key: "value", + provider: "11labs", + apiKey: "apiKey", }, ], - successEvaluation: "successEvaluation", - }, - monitor: { - listenUrl: "listenUrl", - controlUrl: "controlUrl", - }, - artifact: { - messages: [ + hooks: [ { - role: "role", - message: "message", - time: 1.1, - endTime: 1.1, - secondsFromStart: 1.1, + on: "call.ending", + do: [ + { + type: "tool", + }, + ], }, ], - messagesOpenAIFormatted: [ + "tools:append": [ { - content: undefined, - role: "assistant", + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, }, ], - recording: { - stereoUrl: "stereoUrl", - videoUrl: "videoUrl", - videoRecordingStartDelaySeconds: 1.1, - }, - transcript: "transcript", - pcapUrl: "pcapUrl", - logUrl: "logUrl", - nodes: [{}], variableValues: { key: "value", }, - performanceMetrics: { - turnLatencies: [{}], - modelLatencyAverage: 1.1, - voiceLatencyAverage: 1.1, - transcriberLatencyAverage: 1.1, - endpointingLatencyAverage: 1.1, - turnLatencyAverage: 1.1, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, }, - structuredOutputs: { + metadata: { key: "value", }, - transfers: ["transfers"], - }, - compliance: { - recordingConsent: { - type: { - key: "value", + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, }, - grantedAt: "2024-01-15T09:30:00Z", }, - }, - campaignId: "campaignId", - assistantId: "assistantId", - assistant: { - transcriber: { - provider: "assembly-ai", - language: "en", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - realtimeUrl: "realtimeUrl", - wordBoost: ["wordBoost"], - keytermsPrompt: ["keytermsPrompt"], - endUtteranceSilenceThreshold: 1.1, - disablePartialTranscripts: true, - fallbackPlan: { - transcribers: [ + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [ + { + key: "key", + plan: {}, + }, + ], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { + enabled: true, + }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { + provider: "vapi", + }, + customEndpointingRules: [ + { + type: "assistant", + regex: "regex", + timeoutSeconds: 1.1, + }, + ], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { + key: "value", + }, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", }, ], }, }, - model: { - messages: [ + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", + }, + }, + squadId: "squadId", + squad: { + name: "name", + members: [{}], + membersOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + model: "claude-3-opus-20240229", + provider: "anthropic", + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ { - content: undefined, - role: "assistant", + provider: "twilio", + timeout: 60, + record: false, }, ], - tools: [ + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + }, + credentials: [ { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { - type: { - key: "value", + provider: "11labs", + apiKey: "apiKey", + }, + ], + hooks: [ + { + on: "call.ending", + do: [ + { + type: "tool", }, - maxRetries: 0, - baseDelaySeconds: 1, - }, + ], }, ], - toolIds: ["toolIds"], - knowledgeBase: { - provider: "custom-knowledge-base", - server: { + "tools:append": [ + { + type: "apiRequest", + method: "POST", timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", backoffPlan: { type: { key: "value", }, - maxRetries: 0, - baseDelaySeconds: 1, - }, - }, - }, - model: "claude-3-opus-20240229", - provider: "anthropic", - thinking: { - type: "enabled", - budgetTokens: 1.1, - }, - temperature: 1.1, - maxTokens: 1.1, - emotionRecognitionEnabled: true, - numFastTurns: 1.1, - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - chunkPlan: { - enabled: true, - minCharacters: 30, - }, - speed: 1.1, - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", - ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [ - { - provider: "twilio", - timeout: 60, - record: false, - }, - ], - observabilityPlan: { - provider: "langfuse", - tags: ["tags"], - metadata: { - key: "value", - }, - }, - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", - }, - ], - hooks: [ - { - on: "call.ending", - do: [ - { - type: "tool", - }, - ], - }, - ], - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - hipaaEnabled: true, - pciEnabled: true, - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", }, ], }, }, - type: "stay-on-line", - waitSeconds: 3, - }, - }, - metadata: { - key: "value", - }, - backgroundSpeechDenoisingPlan: { - fourierDenoisingPlan: { - mediaDetectionEnabled: true, - staticThreshold: -35, - baselineOffsetDb: -15, - windowSizeMs: 3000, - baselinePercentile: 85, - }, - }, - analysisPlan: { - minMessagesThreshold: 1.1, - structuredDataMultiPlan: [ - { - key: "key", - plan: {}, - }, ], - outcomeIds: ["outcomeIds"], - }, - artifactPlan: { - recordingEnabled: true, - recordingFormat: "wav;l16", - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - transcriptPlan: { - enabled: true, - }, - recordingPath: "recordingPath", - structuredOutputIds: ["structuredOutputIds"], - loggingPath: "loggingPath", - }, - startSpeakingPlan: { - waitSeconds: 0.4, - smartEndpointingPlan: { - provider: "vapi", + variableValues: { + key: "value", }, - customEndpointingRules: [ - { - type: "assistant", - regex: "regex", - timeoutSeconds: 1.1, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + type: "stay-on-line", + waitSeconds: 3, }, - ], - transcriptionEndpointingPlan: { - onPunctuationSeconds: 0.1, - onNoPunctuationSeconds: 1.5, - onNumberSeconds: 0.5, }, - }, - stopSpeakingPlan: { - numWords: 0, - voiceSeconds: 0.2, - backoffSeconds: 1, - acknowledgementPhrases: [ - "i understand", - "i see", - "i got it", - "i hear you", - "im listening", - "im with you", - "right", - "okay", - "ok", - "sure", - "alright", - "got it", - "understood", - "yeah", - "yes", - "uh-huh", - "mm-hmm", - "gotcha", - "mhmm", - "ah", - "yeah okay", - "yeah sure", - ], - interruptionPhrases: [ - "stop", - "shut", - "up", - "enough", - "quiet", - "silence", - "but", - "dont", - "not", - "no", - "hold", - "wait", - "cut", - "pause", - "nope", - "nah", - "nevermind", - "never", - "bad", - "actually", - ], - }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { + metadata: { key: "value", }, - backoffPlan: { - type: { - key: "value", + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { + waitSeconds: 0.4, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - maxRetries: 0, - baseDelaySeconds: 1, }, }, - keypadInputPlan: { - enabled: true, - timeoutSeconds: 1.1, - delimiters: "#", - }, }, - assistantOverrides: { + squadOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -8852,7 +14364,7 @@ describe("Calls", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -8869,6 +14381,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -8878,12 +14404,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -8905,6 +14446,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -8920,11 +14477,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -8938,6 +14491,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -8950,9 +14504,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -8997,6 +14552,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -9069,6 +14638,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -9150,6 +14734,7 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -9160,6 +14745,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -9168,198 +14767,6 @@ describe("Calls", () => { delimiters: "#", }, }, - squadId: "squadId", - squad: { - name: "name", - members: [{}], - membersOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - model: { - model: "claude-3-opus-20240229", - provider: "anthropic", - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", - ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [ - { - provider: "twilio", - timeout: 60, - record: false, - }, - ], - observabilityPlan: { - provider: "langfuse", - tags: ["tags"], - }, - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", - }, - ], - hooks: [ - { - on: "call.ending", - do: [ - { - type: "tool", - }, - ], - }, - ], - "tools:append": [ - { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { - type: { - key: "value", - }, - maxRetries: 0, - baseDelaySeconds: 1, - }, - }, - ], - variableValues: { - key: "value", - }, - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - type: "stay-on-line", - waitSeconds: 3, - }, - }, - metadata: { - key: "value", - }, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - }, - startSpeakingPlan: { - waitSeconds: 0.4, - }, - stopSpeakingPlan: { - numWords: 0, - voiceSeconds: 0.2, - backoffSeconds: 1, - }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { - type: { - key: "value", - }, - maxRetries: 0, - baseDelaySeconds: 1, - }, - }, - }, - }, workflowId: "workflowId", workflow: { nodes: [ @@ -9404,7 +14811,7 @@ describe("Calls", () => { ], model: { provider: "openai", - model: "gpt-5", + model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1, }, @@ -9441,6 +14848,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -9460,7 +14883,7 @@ describe("Calls", () => { key: "value", }, }, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", hooks: [ { on: "call.ending", @@ -9477,11 +14900,7 @@ describe("Calls", () => { apiKey: "apiKey", }, ], - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", maxDurationSeconds: 600, name: "name", edges: [ @@ -9494,6 +14913,7 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -9504,6 +14924,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, compliancePlan: { @@ -9556,6 +14990,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -9692,6 +15141,7 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -9702,6 +15152,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -9751,9 +15215,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -9767,6 +15229,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -9779,9 +15242,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -9823,6 +15287,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -9876,6 +15354,52 @@ describe("Calls", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -9887,12 +15411,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -9915,7 +15454,7 @@ describe("Calls", () => { test("update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { type: "inboundPhoneCall", @@ -9949,8 +15488,10 @@ describe("Calls", () => { message: "message", timeout: 1.1, sipVerb: { key: "value" }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { message: "message" }, @@ -10004,6 +15545,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, analysis: { @@ -10015,7 +15560,7 @@ describe("Calls", () => { monitor: { listenUrl: "listenUrl", controlUrl: "controlUrl" }, artifact: { messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, transcript: "transcript", pcapUrl: "pcapUrl", @@ -10029,9 +15574,15 @@ describe("Calls", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } }, campaignId: "campaignId", @@ -10064,7 +15615,288 @@ describe("Calls", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { type: "enabled", budgetTokens: 1.1 }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, + }, + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [{ key: "key", plan: {} }], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, + }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + }, + assistantOverrides: { + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -10072,7 +15904,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -10081,7 +15923,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -10096,14 +15949,33 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -10117,6 +15989,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -10129,14 +16002,36 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, credentials: [{ provider: "11labs", apiKey: "apiKey" }], hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + variableValues: { key: "value" }, name: "name", voicemailMessage: "voicemailMessage", endCallMessage: "endCallMessage", @@ -10166,106 +16061,317 @@ describe("Calls", () => { windowSizeMs: 3000, baselinePercentile: 85, }, - }, - analysisPlan: { - minMessagesThreshold: 1.1, - structuredDataMultiPlan: [{ key: "key", plan: {} }], - outcomeIds: ["outcomeIds"], - }, - artifactPlan: { - recordingEnabled: true, - recordingFormat: "wav;l16", - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - transcriptPlan: { enabled: true }, - recordingPath: "recordingPath", - structuredOutputIds: ["structuredOutputIds"], - loggingPath: "loggingPath", - }, - startSpeakingPlan: { - waitSeconds: 0.4, - smartEndpointingPlan: { provider: "vapi" }, - customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], - transcriptionEndpointingPlan: { - onPunctuationSeconds: 0.1, - onNoPunctuationSeconds: 1.5, - onNumberSeconds: 0.5, + }, + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [{ key: "key", plan: {} }], + outcomeIds: ["outcomeIds"], + }, + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { enabled: true }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { provider: "vapi" }, + customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, + }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, + }, + squadId: "squadId", + squad: { + name: "name", + members: [{}], + membersOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { model: "claude-3-opus-20240229", provider: "anthropic" }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], + observabilityPlan: { provider: "langfuse", tags: ["tags"] }, + credentials: [{ provider: "11labs", apiKey: "apiKey" }], + hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, + ], + variableValues: { key: "value" }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { key: "value" }, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { waitSeconds: 0.4 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, - stopSpeakingPlan: { - numWords: 0, - voiceSeconds: 0.2, - backoffSeconds: 1, - acknowledgementPhrases: [ - "i understand", - "i see", - "i got it", - "i hear you", - "im listening", - "im with you", - "right", - "okay", - "ok", - "sure", - "alright", - "got it", - "understood", - "yeah", - "yes", - "uh-huh", - "mm-hmm", - "gotcha", - "mhmm", - "ah", - "yeah okay", - "yeah sure", - ], - interruptionPhrases: [ - "stop", - "shut", - "up", - "enough", - "quiet", - "silence", - "but", - "dont", - "not", - "no", - "hold", - "wait", - "cut", - "pause", - "nope", - "nah", - "nevermind", - "never", - "bad", - "actually", - ], - }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, - assistantOverrides: { + squadOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -10293,7 +16399,7 @@ describe("Calls", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -10301,7 +16407,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -10310,7 +16426,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -10325,14 +16452,33 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -10346,6 +16492,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -10358,9 +16505,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -10373,7 +16521,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -10426,6 +16584,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -10499,139 +16661,17 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", - headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, - }, - squadId: "squadId", - squad: { - name: "name", - members: [{}], - membersOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - model: { model: "claude-3-opus-20240229", provider: "anthropic" }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, - }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", - ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], - observabilityPlan: { provider: "langfuse", tags: ["tags"] }, - credentials: [{ provider: "11labs", apiKey: "apiKey" }], - hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], - "tools:append": [ - { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, - ], - variableValues: { key: "value" }, - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }], - }, - }, - type: "stay-on-line", - waitSeconds: 3, - }, - }, - metadata: { key: "value" }, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - }, - startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + headers: { key: "value" }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], }, }, + keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, workflowId: "workflowId", workflow: { @@ -10667,7 +16707,7 @@ describe("Calls", () => { name: "name", }, ], - model: { provider: "openai", model: "gpt-5", temperature: 1.1, maxTokens: 1.1 }, + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, transcriber: { provider: "assembly-ai", language: "en", @@ -10698,15 +16738,34 @@ describe("Calls", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", hooks: [{ on: "call.ending", do: [{ type: "tool" }] }], credentials: [{ provider: "11labs", apiKey: "apiKey" }], - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", maxDurationSeconds: 600, name: "name", edges: [{ from: "from", to: "to" }], @@ -10714,9 +16773,15 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, compliancePlan: { hipaaEnabled: true, @@ -10753,6 +16818,10 @@ describe("Calls", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -10862,9 +16931,15 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, }, customerId: "customerId", @@ -10902,7 +16977,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -10916,6 +16991,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -10928,9 +17004,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -10943,7 +17020,17 @@ describe("Calls", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -10980,7 +17067,57 @@ describe("Calls", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -10991,7 +17128,18 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, number: "number", @@ -11013,7 +17161,9 @@ describe("Calls", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.calls.update("id"); + const response = await client.calls.update({ + id: "id", + }); expect(response).toEqual({ type: "inboundPhoneCall", costs: [ @@ -11057,8 +17207,13 @@ describe("Calls", () => { sipVerb: { key: "value", }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { + type: "lastNMessages", + maxMessages: 1.1, + }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { @@ -11118,6 +17273,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, analysis: { @@ -11130,64 +17300,472 @@ describe("Calls", () => { key: "value", }, ], - successEvaluation: "successEvaluation", - }, - monitor: { - listenUrl: "listenUrl", - controlUrl: "controlUrl", - }, - artifact: { - messages: [ + successEvaluation: "successEvaluation", + }, + monitor: { + listenUrl: "listenUrl", + controlUrl: "controlUrl", + }, + artifact: { + messages: [ + { + role: "role", + message: "message", + time: 1.1, + endTime: 1.1, + secondsFromStart: 1.1, + }, + ], + messagesOpenAIFormatted: [ + { + content: null, + role: "assistant", + }, + ], + recording: { + stereoUrl: "stereoUrl", + videoUrl: "videoUrl", + videoRecordingStartDelaySeconds: 1.1, + }, + transcript: "transcript", + pcapUrl: "pcapUrl", + logUrl: "logUrl", + nodes: [{}], + variableValues: { + key: "value", + }, + performanceMetrics: { + turnLatencies: [{}], + modelLatencyAverage: 1.1, + voiceLatencyAverage: 1.1, + transcriberLatencyAverage: 1.1, + endpointingLatencyAverage: 1.1, + turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, + }, + structuredOutputs: { + key: "value", + }, + scorecards: { + key: "value", + }, + transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", + }, + compliance: { + recordingConsent: { + type: { + key: "value", + }, + grantedAt: "2024-01-15T09:30:00Z", + }, + }, + campaignId: "campaignId", + assistantId: "assistantId", + assistant: { + transcriber: { + provider: "assembly-ai", + language: "en", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + realtimeUrl: "realtimeUrl", + wordBoost: ["wordBoost"], + keytermsPrompt: ["keytermsPrompt"], + endUtteranceSilenceThreshold: 1.1, + disablePartialTranscripts: true, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + messages: [ + { + content: null, + role: "assistant", + }, + ], + tools: [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + toolIds: ["toolIds"], + knowledgeBase: { + provider: "custom-knowledge-base", + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + }, + model: "claude-3-opus-20240229", + provider: "anthropic", + thinking: { + type: "enabled", + budgetTokens: 1.1, + }, + temperature: 1.1, + maxTokens: 1.1, + emotionRecognitionEnabled: true, + numFastTurns: 1.1, + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], + }, + speed: 1.1, + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + metadata: { + key: "value", + }, + }, + credentials: [ { - role: "role", - message: "message", - time: 1.1, - endTime: 1.1, - secondsFromStart: 1.1, + provider: "11labs", + apiKey: "apiKey", }, ], - messagesOpenAIFormatted: [ + hooks: [ { - content: undefined, - role: "assistant", + on: "call.ending", + do: [ + { + type: "tool", + }, + ], }, ], - recording: { - stereoUrl: "stereoUrl", - videoUrl: "videoUrl", - videoRecordingStartDelaySeconds: 1.1, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + hipaaEnabled: true, + pciEnabled: true, + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, }, - transcript: "transcript", - pcapUrl: "pcapUrl", - logUrl: "logUrl", - nodes: [{}], - variableValues: { + metadata: { key: "value", }, - performanceMetrics: { - turnLatencies: [{}], - modelLatencyAverage: 1.1, - voiceLatencyAverage: 1.1, - transcriberLatencyAverage: 1.1, - endpointingLatencyAverage: 1.1, - turnLatencyAverage: 1.1, + backgroundSpeechDenoisingPlan: { + fourierDenoisingPlan: { + mediaDetectionEnabled: true, + staticThreshold: -35, + baselineOffsetDb: -15, + windowSizeMs: 3000, + baselinePercentile: 85, + }, }, - structuredOutputs: { - key: "value", + analysisPlan: { + minMessagesThreshold: 1.1, + structuredDataMultiPlan: [ + { + key: "key", + plan: {}, + }, + ], + outcomeIds: ["outcomeIds"], }, - transfers: ["transfers"], - }, - compliance: { - recordingConsent: { - type: { + artifactPlan: { + recordingEnabled: true, + recordingFormat: "wav;l16", + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + transcriptPlan: { + enabled: true, + }, + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { + provider: "vapi", + }, + customEndpointingRules: [ + { + type: "assistant", + regex: "regex", + timeoutSeconds: 1.1, + }, + ], + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, + }, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value", }, - grantedAt: "2024-01-15T09:30:00Z", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", }, }, - campaignId: "campaignId", - assistantId: "assistantId", - assistant: { + assistantOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -11217,7 +17795,7 @@ describe("Calls", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -11234,6 +17812,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -11243,12 +17835,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -11270,6 +17877,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -11285,11 +17908,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -11303,6 +17922,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -11315,9 +17935,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -11349,6 +17970,39 @@ describe("Calls", () => { ], }, ], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + variableValues: { + key: "value", + }, name: "name", voicemailMessage: "voicemailMessage", endCallMessage: "endCallMessage", @@ -11415,6 +18069,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -11496,25 +18165,307 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", }, - backoffPlan: { - type: { - key: "value", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", + }, + }, + squadId: "squadId", + squad: { + name: "name", + members: [{}], + membersOverrides: { + transcriber: { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + fallbackPlan: { + transcribers: [ + { + provider: "assembly-ai", + confidenceThreshold: 0.4, + formatTurns: true, + endOfTurnConfidenceThreshold: 0.7, + minEndOfTurnSilenceWhenConfident: 160, + maxTurnSilence: 400, + }, + ], + }, + }, + model: { + model: "claude-3-opus-20240229", + provider: "anthropic", + }, + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + firstMessage: "Hello! How can I help you today?", + firstMessageInterruptionsEnabled: true, + firstMessageMode: "assistant-speaks-first", + voicemailDetection: "off", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], + maxDurationSeconds: 600, + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", + modelOutputInMessagesEnabled: false, + transportConfigurations: [ + { + provider: "twilio", + timeout: 60, + record: false, + }, + ], + observabilityPlan: { + provider: "langfuse", + tags: ["tags"], + }, + credentials: [ + { + provider: "11labs", + apiKey: "apiKey", + }, + ], + hooks: [ + { + on: "call.ending", + do: [ + { + type: "tool", + }, + ], + }, + ], + "tools:append": [ + { + type: "apiRequest", + method: "POST", + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + url: "url", + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], + variableValues: { + key: "value", + }, + name: "name", + voicemailMessage: "voicemailMessage", + endCallMessage: "endCallMessage", + endCallPhrases: ["endCallPhrases"], + compliancePlan: { + recordingConsentPlan: { + message: + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + voice: { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + fallbackPlan: { + voices: [ + { + cachingEnabled: true, + provider: "azure", + voiceId: "andrew", + }, + ], + }, + }, + type: "stay-on-line", + waitSeconds: 3, + }, + }, + metadata: { + key: "value", + }, + artifactPlan: { + recordingEnabled: true, + recordingUseCustomStorageEnabled: true, + videoRecordingEnabled: false, + fullMessageHistoryEnabled: false, + pcapEnabled: true, + pcapS3PathPrefix: "/pcaps", + pcapUseCustomStorageEnabled: true, + loggingEnabled: true, + loggingUseCustomStorageEnabled: true, + }, + startSpeakingPlan: { + waitSeconds: 0.4, + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, - maxRetries: 0, - baseDelaySeconds: 1, }, }, - keypadInputPlan: { - enabled: true, - timeoutSeconds: 1.1, - delimiters: "#", - }, }, - assistantOverrides: { + squadOverrides: { transcriber: { provider: "assembly-ai", language: "en", @@ -11544,7 +18495,7 @@ describe("Calls", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -11561,6 +18512,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -11570,12 +18535,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -11597,6 +18577,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -11612,11 +18608,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -11630,6 +18622,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -11642,9 +18635,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -11689,6 +18683,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -11756,301 +18764,139 @@ describe("Calls", () => { pcapUseCustomStorageEnabled: true, loggingEnabled: true, loggingUseCustomStorageEnabled: true, - transcriptPlan: { - enabled: true, - }, - recordingPath: "recordingPath", - structuredOutputIds: ["structuredOutputIds"], - loggingPath: "loggingPath", - }, - startSpeakingPlan: { - waitSeconds: 0.4, - smartEndpointingPlan: { - provider: "vapi", - }, - customEndpointingRules: [ - { - type: "assistant", - regex: "regex", - timeoutSeconds: 1.1, - }, - ], - transcriptionEndpointingPlan: { - onPunctuationSeconds: 0.1, - onNoPunctuationSeconds: 1.5, - onNumberSeconds: 0.5, - }, - }, - stopSpeakingPlan: { - numWords: 0, - voiceSeconds: 0.2, - backoffSeconds: 1, - acknowledgementPhrases: [ - "i understand", - "i see", - "i got it", - "i hear you", - "im listening", - "im with you", - "right", - "okay", - "ok", - "sure", - "alright", - "got it", - "understood", - "yeah", - "yes", - "uh-huh", - "mm-hmm", - "gotcha", - "mhmm", - "ah", - "yeah okay", - "yeah sure", - ], - interruptionPhrases: [ - "stop", - "shut", - "up", - "enough", - "quiet", - "silence", - "but", - "dont", - "not", - "no", - "hold", - "wait", - "cut", - "pause", - "nope", - "nah", - "nevermind", - "never", - "bad", - "actually", - ], - }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - headers: { - key: "value", - }, - backoffPlan: { - type: { - key: "value", - }, - maxRetries: 0, - baseDelaySeconds: 1, - }, - }, - keypadInputPlan: { - enabled: true, - timeoutSeconds: 1.1, - delimiters: "#", - }, - }, - squadId: "squadId", - squad: { - name: "name", - members: [{}], - membersOverrides: { - transcriber: { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - fallbackPlan: { - transcribers: [ - { - provider: "assembly-ai", - confidenceThreshold: 0.4, - formatTurns: true, - endOfTurnConfidenceThreshold: 0.7, - minEndOfTurnSilenceWhenConfident: 160, - maxTurnSilence: 400, - }, - ], - }, - }, - model: { - model: "claude-3-opus-20240229", - provider: "anthropic", - }, - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - firstMessage: "Hello! How can I help you today?", - firstMessageInterruptionsEnabled: true, - firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, - clientMessages: [ - "conversation-update", - "function-call", - "hang", - "model-output", - "speech-update", - "status-update", - "transfer-update", - "transcript", - "tool-calls", - "user-interrupted", - "voice-input", - "workflow.node.started", - ], - serverMessages: [ - "conversation-update", - "end-of-call-report", - "function-call", - "hang", - "speech-update", - "status-update", - "tool-calls", - "transfer-destination-request", - "handoff-destination-request", - "user-interrupted", - ], - maxDurationSeconds: 600, - backgroundSound: "off", - modelOutputInMessagesEnabled: false, - transportConfigurations: [ - { - provider: "twilio", - timeout: 60, - record: false, - }, - ], - observabilityPlan: { - provider: "langfuse", - tags: ["tags"], + transcriptPlan: { + enabled: true, }, - credentials: [ - { - provider: "11labs", - apiKey: "apiKey", - }, - ], - hooks: [ + recordingPath: "recordingPath", + structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ { - on: "call.ending", - do: [ + metrics: [ { - type: "tool", + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], }, ], }, ], - "tools:append": [ + loggingPath: "loggingPath", + }, + startSpeakingPlan: { + waitSeconds: 0.4, + smartEndpointingPlan: { + provider: "vapi", + }, + customEndpointingRules: [ { - type: "apiRequest", - method: "POST", - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - url: "url", - backoffPlan: { - type: { - key: "value", - }, - maxRetries: 0, - baseDelaySeconds: 1, - }, + type: "assistant", + regex: "regex", + timeoutSeconds: 1.1, }, ], - variableValues: { - key: "value", - }, - name: "name", - voicemailMessage: "voicemailMessage", - endCallMessage: "endCallMessage", - endCallPhrases: ["endCallPhrases"], - compliancePlan: { - recordingConsentPlan: { - message: - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - voice: { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - fallbackPlan: { - voices: [ - { - cachingEnabled: true, - provider: "azure", - voiceId: "andrew", - }, - ], - }, - }, - type: "stay-on-line", - waitSeconds: 3, - }, + transcriptionEndpointingPlan: { + onPunctuationSeconds: 0.1, + onNoPunctuationSeconds: 1.5, + onNumberSeconds: 0.5, }, - metadata: { + }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, + monitorPlan: { + listenEnabled: false, + listenAuthenticationEnabled: false, + controlEnabled: false, + controlAuthenticationEnabled: false, + }, + credentialIds: ["credentialIds"], + server: { + timeoutSeconds: 20, + credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, + url: "url", + headers: { key: "value", }, - artifactPlan: { - recordingEnabled: true, - recordingUseCustomStorageEnabled: true, - videoRecordingEnabled: false, - fullMessageHistoryEnabled: false, - pcapEnabled: true, - pcapS3PathPrefix: "/pcaps", - pcapUseCustomStorageEnabled: true, - loggingEnabled: true, - loggingUseCustomStorageEnabled: true, - }, - startSpeakingPlan: { - waitSeconds: 0.4, - }, - stopSpeakingPlan: { - numWords: 0, - voiceSeconds: 0.2, - backoffSeconds: 1, - }, - monitorPlan: { - listenEnabled: false, - listenAuthenticationEnabled: false, - controlEnabled: false, - controlAuthenticationEnabled: false, - }, - credentialIds: ["credentialIds"], - server: { - timeoutSeconds: 20, - credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { - type: { + backoffPlan: { + type: { + key: "value", + }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value", }, - maxRetries: 0, - baseDelaySeconds: 1, - }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, + keypadInputPlan: { + enabled: true, + timeoutSeconds: 1.1, + delimiters: "#", + }, }, workflowId: "workflowId", workflow: { @@ -12096,7 +18942,7 @@ describe("Calls", () => { ], model: { provider: "openai", - model: "gpt-5", + model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1, }, @@ -12133,6 +18979,22 @@ describe("Calls", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -12152,7 +19014,7 @@ describe("Calls", () => { key: "value", }, }, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", hooks: [ { on: "call.ending", @@ -12169,11 +19031,7 @@ describe("Calls", () => { apiKey: "apiKey", }, ], - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", maxDurationSeconds: 600, name: "name", edges: [ @@ -12186,6 +19044,7 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -12196,6 +19055,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, compliancePlan: { @@ -12248,6 +19121,21 @@ describe("Calls", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -12384,6 +19272,7 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -12394,6 +19283,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -12443,9 +19346,7 @@ describe("Calls", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -12459,6 +19360,7 @@ describe("Calls", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -12471,9 +19373,10 @@ describe("Calls", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -12515,6 +19418,20 @@ describe("Calls", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -12568,6 +19485,52 @@ describe("Calls", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -12579,12 +19542,27 @@ describe("Calls", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, diff --git a/tests/wire/campaigns.test.ts b/tests/wire/campaigns.test.ts index 9e19f5fc..f0861a64 100644 --- a/tests/wire/campaigns.test.ts +++ b/tests/wire/campaigns.test.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Campaigns", () => { +describe("CampaignsClient", () => { test("CampaignController_findAll", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { results: [ @@ -44,21 +42,7 @@ describe("Campaigns", () => { }; server.mockEndpoint().get("/campaign").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.campaigns.campaignControllerFindAll({ - id: "id", - status: "scheduled", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.campaigns.campaignControllerFindAll(); expect(response).toEqual({ results: [ { @@ -99,7 +83,7 @@ describe("Campaigns", () => { test("CampaignController_create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "Q2 Sales Campaign", phoneNumberId: "phoneNumberId", customers: [{}] }; const rawResponseBody = { status: "scheduled", @@ -141,8 +125,36 @@ describe("Campaigns", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -229,8 +241,36 @@ describe("Campaigns", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -263,7 +303,7 @@ describe("Campaigns", () => { test("CampaignController_findOne", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { status: "scheduled", @@ -305,8 +345,36 @@ describe("Campaigns", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -330,7 +398,9 @@ describe("Campaigns", () => { }; server.mockEndpoint().get("/campaign/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.campaigns.campaignControllerFindOne("id"); + const response = await client.campaigns.campaignControllerFindOne({ + id: "id", + }); expect(response).toEqual({ status: "scheduled", endedReason: "campaign.scheduled.ended-by-user", @@ -382,8 +452,36 @@ describe("Campaigns", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -416,7 +514,7 @@ describe("Campaigns", () => { test("CampaignController_remove", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { status: "scheduled", @@ -458,8 +556,36 @@ describe("Campaigns", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -483,7 +609,9 @@ describe("Campaigns", () => { }; server.mockEndpoint().delete("/campaign/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.campaigns.campaignControllerRemove("id"); + const response = await client.campaigns.campaignControllerRemove({ + id: "id", + }); expect(response).toEqual({ status: "scheduled", endedReason: "campaign.scheduled.ended-by-user", @@ -535,8 +663,36 @@ describe("Campaigns", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -569,7 +725,7 @@ describe("Campaigns", () => { test("CampaignController_update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { status: "scheduled", @@ -611,8 +767,36 @@ describe("Campaigns", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -643,7 +827,9 @@ describe("Campaigns", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.campaigns.campaignControllerUpdate("id"); + const response = await client.campaigns.campaignControllerUpdate({ + id: "id", + }); expect(response).toEqual({ status: "scheduled", endedReason: "campaign.scheduled.ended-by-user", @@ -695,8 +881,36 @@ describe("Campaigns", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { diff --git a/tests/wire/chats.test.ts b/tests/wire/chats.test.ts index da05d322..76e14c4e 100644 --- a/tests/wire/chats.test.ts +++ b/tests/wire/chats.test.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Chats", () => { +describe("ChatsClient", () => { test("list", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { results: [ @@ -42,8 +40,36 @@ describe("Chats", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -75,8 +101,36 @@ describe("Chats", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -110,23 +164,7 @@ describe("Chats", () => { }; server.mockEndpoint().get("/chat").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.chats.list({ - assistantId: "assistantId", - squadId: "squadId", - workflowId: "workflowId", - sessionId: "sessionId", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.chats.list(); expect(response).toEqual({ results: [ { @@ -167,8 +205,36 @@ describe("Chats", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -213,8 +279,36 @@ describe("Chats", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -279,7 +373,7 @@ describe("Chats", () => { test("create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { input: "input" }; const rawResponseBody = { assistantId: "assistantId", @@ -311,7 +405,7 @@ describe("Chats", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -319,7 +413,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -328,7 +432,18 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -343,14 +458,33 @@ describe("Chats", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -364,6 +498,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -376,9 +511,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -433,6 +569,10 @@ describe("Chats", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -506,9 +646,15 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -540,7 +686,7 @@ describe("Chats", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -548,7 +694,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -557,7 +713,18 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -572,14 +739,33 @@ describe("Chats", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -593,6 +779,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -605,9 +792,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -620,7 +808,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -673,6 +871,10 @@ describe("Chats", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -746,9 +948,15 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -787,7 +995,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -801,6 +1009,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -813,9 +1022,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -828,7 +1038,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -865,7 +1085,57 @@ describe("Chats", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -876,7 +1146,18 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, }, @@ -938,7 +1219,7 @@ describe("Chats", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -955,6 +1236,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -964,12 +1259,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -991,6 +1301,22 @@ describe("Chats", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -1006,11 +1332,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1024,6 +1346,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1036,9 +1359,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1136,6 +1460,21 @@ describe("Chats", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1217,6 +1556,7 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -1227,6 +1567,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -1265,7 +1619,7 @@ describe("Chats", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -1282,6 +1636,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1291,12 +1659,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1318,6 +1701,22 @@ describe("Chats", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -1333,11 +1732,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1351,6 +1746,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1363,9 +1759,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1410,6 +1807,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1482,6 +1893,21 @@ describe("Chats", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1563,6 +1989,7 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -1573,6 +2000,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -1627,9 +2068,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1643,6 +2082,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1655,9 +2095,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1699,6 +2140,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1752,6 +2207,52 @@ describe("Chats", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -1763,12 +2264,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1815,7 +2331,7 @@ describe("Chats", () => { test("get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { assistantId: "assistantId", @@ -1847,7 +2363,7 @@ describe("Chats", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -1855,7 +2371,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -1864,7 +2390,18 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -1879,14 +2416,33 @@ describe("Chats", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1900,6 +2456,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1912,9 +2469,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -1969,6 +2527,10 @@ describe("Chats", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2042,9 +2604,15 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -2076,7 +2644,7 @@ describe("Chats", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -2084,7 +2652,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -2093,7 +2671,18 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -2108,14 +2697,33 @@ describe("Chats", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2129,6 +2737,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2141,9 +2750,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -2156,7 +2766,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -2209,6 +2829,10 @@ describe("Chats", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2282,9 +2906,15 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -2323,7 +2953,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2337,6 +2967,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2349,9 +2980,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -2364,7 +2996,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -2401,7 +3043,57 @@ describe("Chats", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -2412,8 +3104,19 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, - }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, + }, }, }, name: "name", @@ -2432,7 +3135,9 @@ describe("Chats", () => { }; server.mockEndpoint().get("/chat/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.chats.get("id"); + const response = await client.chats.get({ + id: "id", + }); expect(response).toEqual({ assistantId: "assistantId", assistant: { @@ -2465,7 +3170,7 @@ describe("Chats", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -2482,6 +3187,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -2491,12 +3210,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2518,6 +3252,22 @@ describe("Chats", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -2533,11 +3283,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2551,6 +3297,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2563,9 +3310,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -2663,6 +3411,21 @@ describe("Chats", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2744,6 +3507,7 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -2754,6 +3518,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -2792,7 +3570,7 @@ describe("Chats", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -2809,6 +3587,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -2818,12 +3610,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2845,6 +3652,22 @@ describe("Chats", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -2860,11 +3683,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2878,6 +3697,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2890,9 +3710,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -2937,6 +3758,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3009,6 +3844,21 @@ describe("Chats", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3090,6 +3940,7 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -3100,6 +3951,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -3154,9 +4019,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3170,6 +4033,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3182,9 +4046,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -3226,6 +4091,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3279,6 +4158,52 @@ describe("Chats", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -3290,12 +4215,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -3342,7 +4282,7 @@ describe("Chats", () => { test("delete", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { assistantId: "assistantId", @@ -3374,7 +4314,7 @@ describe("Chats", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -3382,7 +4322,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -3391,7 +4341,18 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -3406,14 +4367,33 @@ describe("Chats", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3427,6 +4407,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3439,9 +4420,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -3496,6 +4478,10 @@ describe("Chats", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3569,9 +4555,15 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -3603,7 +4595,7 @@ describe("Chats", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -3611,7 +4603,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -3620,7 +4622,18 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -3635,14 +4648,33 @@ describe("Chats", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3656,6 +4688,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3668,9 +4701,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -3683,7 +4717,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -3736,6 +4780,10 @@ describe("Chats", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3809,9 +4857,15 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -3850,7 +4904,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3864,6 +4918,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3876,9 +4931,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -3891,7 +4947,17 @@ describe("Chats", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -3928,7 +4994,57 @@ describe("Chats", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -3939,7 +5055,18 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, }, @@ -3959,7 +5086,9 @@ describe("Chats", () => { }; server.mockEndpoint().delete("/chat/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.chats.delete("id"); + const response = await client.chats.delete({ + id: "id", + }); expect(response).toEqual({ assistantId: "assistantId", assistant: { @@ -3992,7 +5121,7 @@ describe("Chats", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -4009,6 +5138,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -4018,12 +5161,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -4045,6 +5203,22 @@ describe("Chats", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -4060,11 +5234,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -4078,6 +5248,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -4090,9 +5261,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -4190,6 +5362,21 @@ describe("Chats", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -4271,6 +5458,7 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -4281,6 +5469,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -4319,7 +5521,7 @@ describe("Chats", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -4336,6 +5538,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -4345,12 +5561,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -4372,6 +5603,22 @@ describe("Chats", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -4387,11 +5634,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -4405,6 +5648,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -4417,9 +5661,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -4464,6 +5709,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -4536,6 +5795,21 @@ describe("Chats", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -4617,6 +5891,7 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -4627,6 +5902,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -4681,9 +5970,7 @@ describe("Chats", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -4697,6 +5984,7 @@ describe("Chats", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -4709,9 +5997,10 @@ describe("Chats", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -4753,6 +6042,20 @@ describe("Chats", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -4806,6 +6109,52 @@ describe("Chats", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -4817,12 +6166,27 @@ describe("Chats", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -4869,7 +6233,7 @@ describe("Chats", () => { test("createResponse", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { input: "input" }; const rawResponseBody = { id: "id", diff --git a/tests/wire/eval.test.ts b/tests/wire/eval.test.ts index bcb00c5f..6a5fa0c3 100644 --- a/tests/wire/eval.test.ts +++ b/tests/wire/eval.test.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Eval", () => { +describe("EvalClient", () => { test("EvalController_getPaginated", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { results: [ @@ -40,20 +38,7 @@ describe("Eval", () => { }; server.mockEndpoint().get("/eval").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.eval.evalControllerGetPaginated({ - id: "id", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.eval.evalControllerGetPaginated(); expect(response).toEqual({ results: [ { @@ -93,7 +78,7 @@ describe("Eval", () => { test("EvalController_create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { messages: [{ role: "assistant" }], type: "chat.mockConversation" }; const rawResponseBody = { messages: [ @@ -155,7 +140,7 @@ describe("Eval", () => { test("EvalController_get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { messages: [ @@ -175,7 +160,9 @@ describe("Eval", () => { }; server.mockEndpoint().get("/eval/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.eval.evalControllerGet("id"); + const response = await client.eval.evalControllerGet({ + id: "id", + }); expect(response).toEqual({ messages: [ { @@ -203,7 +190,7 @@ describe("Eval", () => { test("EvalController_remove", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { messages: [ @@ -223,7 +210,9 @@ describe("Eval", () => { }; server.mockEndpoint().delete("/eval/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.eval.evalControllerRemove("id"); + const response = await client.eval.evalControllerRemove({ + id: "id", + }); expect(response).toEqual({ messages: [ { @@ -251,7 +240,7 @@ describe("Eval", () => { test("EvalController_update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { messages: [ @@ -278,7 +267,9 @@ describe("Eval", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.eval.evalControllerUpdate("id"); + const response = await client.eval.evalControllerUpdate({ + id: "id", + }); expect(response).toEqual({ messages: [ { @@ -306,7 +297,7 @@ describe("Eval", () => { test("EvalController_getRun", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { status: "running", @@ -355,7 +346,7 @@ describe("Eval", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -369,6 +360,7 @@ describe("Eval", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -381,9 +373,10 @@ describe("Eval", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -422,7 +415,57 @@ describe("Eval", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -433,7 +476,18 @@ describe("Eval", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, assistantOverrides: { @@ -467,7 +521,7 @@ describe("Eval", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -481,6 +535,7 @@ describe("Eval", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -493,9 +548,10 @@ describe("Eval", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -508,7 +564,17 @@ describe("Eval", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -545,7 +611,57 @@ describe("Eval", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -556,7 +672,18 @@ describe("Eval", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, type: "assistant", @@ -576,12 +703,16 @@ describe("Eval", () => { endedAt: "2021-01-01T00:00:00Z", }, ], + cost: 0.01, + costs: [{ key: "value" }], type: "eval", evalId: "123e4567-e89b-12d3-a456-426614174000", }; server.mockEndpoint().get("/eval/run/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.eval.evalControllerGetRun("id"); + const response = await client.eval.evalControllerGetRun({ + id: "id", + }); expect(response).toEqual({ status: "running", endedReason: "mockConversation.done", @@ -647,9 +778,7 @@ describe("Eval", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -663,6 +792,7 @@ describe("Eval", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -675,9 +805,10 @@ describe("Eval", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -753,6 +884,52 @@ describe("Eval", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -764,12 +941,27 @@ describe("Eval", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -815,9 +1007,7 @@ describe("Eval", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -831,6 +1021,7 @@ describe("Eval", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -843,9 +1034,10 @@ describe("Eval", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -887,6 +1079,20 @@ describe("Eval", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -940,6 +1146,52 @@ describe("Eval", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -951,12 +1203,27 @@ describe("Eval", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -982,6 +1249,12 @@ describe("Eval", () => { endedAt: "2021-01-01T00:00:00Z", }, ], + cost: 0.01, + costs: [ + { + key: "value", + }, + ], type: "eval", evalId: "123e4567-e89b-12d3-a456-426614174000", }); @@ -989,7 +1262,7 @@ describe("Eval", () => { test("EvalController_removeRun", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { status: "running", @@ -1038,7 +1311,7 @@ describe("Eval", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1052,6 +1325,7 @@ describe("Eval", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1064,9 +1338,10 @@ describe("Eval", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -1105,7 +1380,57 @@ describe("Eval", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -1116,7 +1441,18 @@ describe("Eval", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, assistantOverrides: { @@ -1150,7 +1486,7 @@ describe("Eval", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1164,6 +1500,7 @@ describe("Eval", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1176,9 +1513,10 @@ describe("Eval", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -1191,7 +1529,17 @@ describe("Eval", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -1228,7 +1576,57 @@ describe("Eval", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -1239,7 +1637,18 @@ describe("Eval", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, type: "assistant", @@ -1259,12 +1668,16 @@ describe("Eval", () => { endedAt: "2021-01-01T00:00:00Z", }, ], + cost: 0.01, + costs: [{ key: "value" }], type: "eval", evalId: "123e4567-e89b-12d3-a456-426614174000", }; server.mockEndpoint().delete("/eval/run/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.eval.evalControllerRemoveRun("id"); + const response = await client.eval.evalControllerRemoveRun({ + id: "id", + }); expect(response).toEqual({ status: "running", endedReason: "mockConversation.done", @@ -1330,9 +1743,7 @@ describe("Eval", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1346,6 +1757,7 @@ describe("Eval", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1358,9 +1770,10 @@ describe("Eval", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1436,6 +1849,52 @@ describe("Eval", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -1447,12 +1906,27 @@ describe("Eval", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1498,9 +1972,7 @@ describe("Eval", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1514,6 +1986,7 @@ describe("Eval", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1526,9 +1999,10 @@ describe("Eval", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1570,6 +2044,20 @@ describe("Eval", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1623,6 +2111,52 @@ describe("Eval", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -1634,12 +2168,27 @@ describe("Eval", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1665,6 +2214,12 @@ describe("Eval", () => { endedAt: "2021-01-01T00:00:00Z", }, ], + cost: 0.01, + costs: [ + { + key: "value", + }, + ], type: "eval", evalId: "123e4567-e89b-12d3-a456-426614174000", }); @@ -1672,7 +2227,7 @@ describe("Eval", () => { test("EvalController_getRunsPaginated", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { results: [ @@ -1706,6 +2261,8 @@ describe("Eval", () => { endedAt: "2021-01-01T00:00:00Z", }, ], + cost: 0.01, + costs: [{ key: "value" }], type: "eval", evalId: "123e4567-e89b-12d3-a456-426614174000", }, @@ -1721,20 +2278,7 @@ describe("Eval", () => { }; server.mockEndpoint().get("/eval/run").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.eval.evalControllerGetRunsPaginated({ - id: "id", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.eval.evalControllerGetRunsPaginated(); expect(response).toEqual({ results: [ { @@ -1782,6 +2326,12 @@ describe("Eval", () => { endedAt: "2021-01-01T00:00:00Z", }, ], + cost: 0.01, + costs: [ + { + key: "value", + }, + ], type: "eval", evalId: "123e4567-e89b-12d3-a456-426614174000", }, @@ -1799,7 +2349,7 @@ describe("Eval", () => { test("EvalController_run", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { target: { type: "assistant" }, type: "eval" }; const rawResponseBody = { key: "value" }; server @@ -1815,6 +2365,7 @@ describe("Eval", () => { target: { type: "assistant", }, + type: "eval", }); expect(response).toEqual({ key: "value", diff --git a/tests/wire/files.test.ts b/tests/wire/files.test.ts index 1102acc1..0bcc2763 100644 --- a/tests/wire/files.test.ts +++ b/tests/wire/files.test.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Files", () => { +describe("FilesClient", () => { test("list", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = [ { @@ -63,7 +61,7 @@ describe("Files", () => { test("get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { object: "file", @@ -87,7 +85,9 @@ describe("Files", () => { }; server.mockEndpoint().get("/file/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.files.get("id"); + const response = await client.files.get({ + id: "id", + }); expect(response).toEqual({ object: "file", status: "processing", @@ -114,7 +114,7 @@ describe("Files", () => { test("delete", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { object: "file", @@ -138,7 +138,9 @@ describe("Files", () => { }; server.mockEndpoint().delete("/file/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.files.delete("id"); + const response = await client.files.delete({ + id: "id", + }); expect(response).toEqual({ object: "file", status: "processing", @@ -165,7 +167,7 @@ describe("Files", () => { test("update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { object: "file", @@ -196,7 +198,9 @@ describe("Files", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.files.update("id"); + const response = await client.files.update({ + id: "id", + }); expect(response).toEqual({ object: "file", status: "processing", diff --git a/tests/wire/insight.test.ts b/tests/wire/insight.test.ts new file mode 100644 index 00000000..f810d2c8 --- /dev/null +++ b/tests/wire/insight.test.ts @@ -0,0 +1,518 @@ +// This file was auto-generated by Fern from our API Definition. + +import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("InsightClient", () => { + test("InsightController_findAll", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + results: [ + { + name: "name", + type: "bar", + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }, + ], + metadata: { + itemsPerPage: 1.1, + totalItems: 1.1, + currentPage: 1.1, + itemsBeyondRetention: true, + createdAtLe: "2024-01-15T09:30:00Z", + createdAtGe: "2024-01-15T09:30:00Z", + }, + }; + server.mockEndpoint().get("/reporting/insight").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); + + const response = await client.insight.insightControllerFindAll(); + expect(response).toEqual({ + results: [ + { + name: "name", + type: "bar", + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }, + ], + metadata: { + itemsPerPage: 1.1, + totalItems: 1.1, + currentPage: 1.1, + itemsBeyondRetention: true, + createdAtLe: "2024-01-15T09:30:00Z", + createdAtGe: "2024-01-15T09:30:00Z", + }, + }); + }); + + test("InsightController_create", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { + type: "bar", + queries: [{ type: "vapiql-json", table: "call", column: "id", operation: "count" }], + }; + const rawResponseBody = { + name: "name", + type: "bar", + formulas: [{ name: "Booking Rate", formula: "formula" }], + metadata: { + xAxisLabel: "xAxisLabel", + yAxisLabel: "yAxisLabel", + yAxisMin: 1.1, + yAxisMax: 1.1, + name: "name", + }, + timeRange: { step: "minute", start: { key: "value" }, end: { key: "value" }, timezone: "timezone" }, + groupBy: "assistantId", + queries: [ + { + type: "vapiql-json", + table: "call", + filters: [{ column: "assistantId", operator: "=", value: "value" }], + column: "id", + operation: "count", + name: "Total Calls", + }, + ], + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .post("/reporting/insight") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.insight.insightControllerCreate({ + type: "bar", + queries: [ + { + type: "vapiql-json", + table: "call", + column: "id", + operation: "count", + }, + ], + }); + expect(response).toEqual({ + name: "name", + type: "bar", + formulas: [ + { + name: "Booking Rate", + formula: "formula", + }, + ], + metadata: { + xAxisLabel: "xAxisLabel", + yAxisLabel: "yAxisLabel", + yAxisMin: 1.1, + yAxisMax: 1.1, + name: "name", + }, + timeRange: { + step: "minute", + start: { + key: "value", + }, + end: { + key: "value", + }, + timezone: "timezone", + }, + groupBy: "assistantId", + queries: [ + { + type: "vapiql-json", + table: "call", + filters: [ + { + column: "assistantId", + operator: "=", + value: "value", + }, + ], + column: "id", + operation: "count", + name: "Total Calls", + }, + ], + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }); + }); + + test("InsightController_findOne", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + name: "name", + type: "bar", + formulas: [{ name: "Booking Rate", formula: "formula" }], + metadata: { + xAxisLabel: "xAxisLabel", + yAxisLabel: "yAxisLabel", + yAxisMin: 1.1, + yAxisMax: 1.1, + name: "name", + }, + timeRange: { step: "minute", start: { key: "value" }, end: { key: "value" }, timezone: "timezone" }, + groupBy: "assistantId", + queries: [ + { + type: "vapiql-json", + table: "call", + filters: [{ column: "assistantId", operator: "=", value: "value" }], + column: "id", + operation: "count", + name: "Total Calls", + }, + ], + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .get("/reporting/insight/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.insight.insightControllerFindOne({ + id: "id", + }); + expect(response).toEqual({ + name: "name", + type: "bar", + formulas: [ + { + name: "Booking Rate", + formula: "formula", + }, + ], + metadata: { + xAxisLabel: "xAxisLabel", + yAxisLabel: "yAxisLabel", + yAxisMin: 1.1, + yAxisMax: 1.1, + name: "name", + }, + timeRange: { + step: "minute", + start: { + key: "value", + }, + end: { + key: "value", + }, + timezone: "timezone", + }, + groupBy: "assistantId", + queries: [ + { + type: "vapiql-json", + table: "call", + filters: [ + { + column: "assistantId", + operator: "=", + value: "value", + }, + ], + column: "id", + operation: "count", + name: "Total Calls", + }, + ], + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }); + }); + + test("InsightController_remove", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + name: "name", + type: "bar", + formulas: [{ name: "Booking Rate", formula: "formula" }], + metadata: { + xAxisLabel: "xAxisLabel", + yAxisLabel: "yAxisLabel", + yAxisMin: 1.1, + yAxisMax: 1.1, + name: "name", + }, + timeRange: { step: "minute", start: { key: "value" }, end: { key: "value" }, timezone: "timezone" }, + groupBy: "assistantId", + queries: [ + { + type: "vapiql-json", + table: "call", + filters: [{ column: "assistantId", operator: "=", value: "value" }], + column: "id", + operation: "count", + name: "Total Calls", + }, + ], + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .delete("/reporting/insight/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.insight.insightControllerRemove({ + id: "id", + }); + expect(response).toEqual({ + name: "name", + type: "bar", + formulas: [ + { + name: "Booking Rate", + formula: "formula", + }, + ], + metadata: { + xAxisLabel: "xAxisLabel", + yAxisLabel: "yAxisLabel", + yAxisMin: 1.1, + yAxisMax: 1.1, + name: "name", + }, + timeRange: { + step: "minute", + start: { + key: "value", + }, + end: { + key: "value", + }, + timezone: "timezone", + }, + groupBy: "assistantId", + queries: [ + { + type: "vapiql-json", + table: "call", + filters: [ + { + column: "assistantId", + operator: "=", + value: "value", + }, + ], + column: "id", + operation: "count", + name: "Total Calls", + }, + ], + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }); + }); + + test("InsightController_update", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { type: "bar" }; + const rawResponseBody = { + name: "name", + type: "bar", + formulas: [{ name: "Booking Rate", formula: "formula" }], + metadata: { + xAxisLabel: "xAxisLabel", + yAxisLabel: "yAxisLabel", + yAxisMin: 1.1, + yAxisMax: 1.1, + name: "name", + }, + timeRange: { step: "minute", start: { key: "value" }, end: { key: "value" }, timezone: "timezone" }, + groupBy: "assistantId", + queries: [ + { + type: "vapiql-json", + table: "call", + filters: [{ column: "assistantId", operator: "=", value: "value" }], + column: "id", + operation: "count", + name: "Total Calls", + }, + ], + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .patch("/reporting/insight/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.insight.insightControllerUpdate({ + id: "id", + body: { + type: "bar", + }, + }); + expect(response).toEqual({ + name: "name", + type: "bar", + formulas: [ + { + name: "Booking Rate", + formula: "formula", + }, + ], + metadata: { + xAxisLabel: "xAxisLabel", + yAxisLabel: "yAxisLabel", + yAxisMin: 1.1, + yAxisMax: 1.1, + name: "name", + }, + timeRange: { + step: "minute", + start: { + key: "value", + }, + end: { + key: "value", + }, + timezone: "timezone", + }, + groupBy: "assistantId", + queries: [ + { + type: "vapiql-json", + table: "call", + filters: [ + { + column: "assistantId", + operator: "=", + value: "value", + }, + ], + column: "id", + operation: "count", + name: "Total Calls", + }, + ], + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }); + }); + + test("InsightController_run", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + id: "id", + insightId: "insightId", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .post("/reporting/insight/id/run") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.insight.insightControllerRun({ + id: "id", + }); + expect(response).toEqual({ + id: "id", + insightId: "insightId", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }); + }); + + test("InsightController_preview", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { + type: "bar", + queries: [{ type: "vapiql-json", table: "call", column: "id", operation: "count" }], + }; + const rawResponseBody = { + id: "id", + insightId: "insightId", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .post("/reporting/insight/preview") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.insight.insightControllerPreview({ + type: "bar", + queries: [ + { + type: "vapiql-json", + table: "call", + column: "id", + operation: "count", + }, + ], + }); + expect(response).toEqual({ + id: "id", + insightId: "insightId", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + }); + }); +}); diff --git a/tests/wire/observabilityScorecard.test.ts b/tests/wire/observabilityScorecard.test.ts new file mode 100644 index 00000000..dcd91073 --- /dev/null +++ b/tests/wire/observabilityScorecard.test.ts @@ -0,0 +1,271 @@ +// This file was auto-generated by Fern from our API Definition. + +import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("ObservabilityScorecardClient", () => { + test("ScorecardController_get", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }], + assistantIds: ["assistantIds"], + }; + server + .mockEndpoint() + .get("/observability/scorecard/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.observabilityScorecard.scorecardControllerGet({ + id: "id", + }); + expect(response).toEqual({ + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + assistantIds: ["assistantIds"], + }); + }); + + test("ScorecardController_remove", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }], + assistantIds: ["assistantIds"], + }; + server + .mockEndpoint() + .delete("/observability/scorecard/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.observabilityScorecard.scorecardControllerRemove({ + id: "id", + }); + expect(response).toEqual({ + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + assistantIds: ["assistantIds"], + }); + }); + + test("ScorecardController_update", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }], + assistantIds: ["assistantIds"], + }; + server + .mockEndpoint() + .patch("/observability/scorecard/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.observabilityScorecard.scorecardControllerUpdate({ + id: "id", + }); + expect(response).toEqual({ + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + assistantIds: ["assistantIds"], + }); + }); + + test("ScorecardController_getPaginated", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + results: [ + { + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }], + assistantIds: ["assistantIds"], + }, + ], + metadata: { + itemsPerPage: 1.1, + totalItems: 1.1, + currentPage: 1.1, + itemsBeyondRetention: true, + createdAtLe: "2024-01-15T09:30:00Z", + createdAtGe: "2024-01-15T09:30:00Z", + }, + }; + server + .mockEndpoint() + .get("/observability/scorecard") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.observabilityScorecard.scorecardControllerGetPaginated(); + expect(response).toEqual({ + results: [ + { + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + assistantIds: ["assistantIds"], + }, + ], + metadata: { + itemsPerPage: 1.1, + totalItems: 1.1, + currentPage: 1.1, + itemsBeyondRetention: true, + createdAtLe: "2024-01-15T09:30:00Z", + createdAtGe: "2024-01-15T09:30:00Z", + }, + }); + }); + + test("ScorecardController_create", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { + metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }], + }; + const rawResponseBody = { + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }], + assistantIds: ["assistantIds"], + }; + server + .mockEndpoint() + .post("/observability/scorecard") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.observabilityScorecard.scorecardControllerCreate({ + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }); + expect(response).toEqual({ + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + assistantIds: ["assistantIds"], + }); + }); +}); diff --git a/tests/wire/phoneNumbers.test.ts b/tests/wire/phoneNumbers.test.ts index 4b663baf..d357f85e 100644 --- a/tests/wire/phoneNumbers.test.ts +++ b/tests/wire/phoneNumbers.test.ts @@ -1,15 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; -import * as Vapi from "../../src/api/index"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("PhoneNumbers", () => { +describe("PhoneNumbersClient", () => { test("list", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = [ { @@ -38,9 +35,15 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, number: "number", credentialId: "credentialId", @@ -48,17 +51,7 @@ describe("PhoneNumbers", () => { ]; server.mockEndpoint().get("/phone-number").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.phoneNumbers.list({ - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.phoneNumbers.list(); expect(response).toEqual([ { fallbackDestination: { @@ -97,6 +90,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -107,6 +101,20 @@ describe("PhoneNumbers", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, number: "number", @@ -117,7 +125,7 @@ describe("PhoneNumbers", () => { test("create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "byo-phone-number", credentialId: "credentialId" }; const rawResponseBody = { fallbackDestination: { @@ -132,8 +140,10 @@ describe("PhoneNumbers", () => { message: "message", timeout: 1.1, sipVerb: { key: "value" }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { message: "message" }, @@ -155,6 +165,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, backoffPlan: { @@ -195,8 +206,13 @@ describe("PhoneNumbers", () => { sipVerb: { key: "value", }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { + type: "lastNMessages", + maxMessages: 1.1, + }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { @@ -229,6 +245,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -262,7 +279,7 @@ describe("PhoneNumbers", () => { test("PhoneNumberController_findAllPaginated", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { results: [ @@ -283,7 +300,18 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, number: "number", credentialId: "credentialId", @@ -300,20 +328,7 @@ describe("PhoneNumbers", () => { }; server.mockEndpoint().get("/v2/phone-number").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.phoneNumbers.phoneNumberControllerFindAllPaginated({ - search: "search", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.phoneNumbers.phoneNumberControllerFindAllPaginated(); expect(response).toEqual({ results: [ { @@ -345,12 +360,27 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, number: "number", @@ -370,7 +400,7 @@ describe("PhoneNumbers", () => { test("get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { fallbackDestination: { @@ -385,8 +415,10 @@ describe("PhoneNumbers", () => { message: "message", timeout: 1.1, sipVerb: { key: "value" }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { message: "message" }, @@ -408,6 +440,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, backoffPlan: { @@ -422,7 +455,9 @@ describe("PhoneNumbers", () => { }; server.mockEndpoint().get("/phone-number/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.phoneNumbers.get("id"); + const response = await client.phoneNumbers.get({ + id: "id", + }); expect(response).toEqual({ fallbackDestination: { message: "message", @@ -438,8 +473,13 @@ describe("PhoneNumbers", () => { sipVerb: { key: "value", }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { + type: "lastNMessages", + maxMessages: 1.1, + }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { @@ -472,6 +512,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -505,7 +546,7 @@ describe("PhoneNumbers", () => { test("delete", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { fallbackDestination: { @@ -520,8 +561,10 @@ describe("PhoneNumbers", () => { message: "message", timeout: 1.1, sipVerb: { key: "value" }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { message: "message" }, @@ -543,6 +586,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, backoffPlan: { @@ -563,7 +607,9 @@ describe("PhoneNumbers", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.phoneNumbers.delete("id"); + const response = await client.phoneNumbers.delete({ + id: "id", + }); expect(response).toEqual({ fallbackDestination: { message: "message", @@ -579,8 +625,13 @@ describe("PhoneNumbers", () => { sipVerb: { key: "value", }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { + type: "lastNMessages", + maxMessages: 1.1, + }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { @@ -613,6 +664,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -646,7 +698,7 @@ describe("PhoneNumbers", () => { test("update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { fallbackDestination: { @@ -661,8 +713,10 @@ describe("PhoneNumbers", () => { message: "message", timeout: 1.1, sipVerb: { key: "value" }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { message: "message" }, @@ -684,6 +738,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, backoffPlan: { @@ -705,7 +760,10 @@ describe("PhoneNumbers", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.phoneNumbers.update("id", {}); + const response = await client.phoneNumbers.update({ + id: "id", + body: {}, + }); expect(response).toEqual({ fallbackDestination: { message: "message", @@ -721,8 +779,13 @@ describe("PhoneNumbers", () => { sipVerb: { key: "value", }, + dialTimeout: 1.1, holdAudioUrl: "holdAudioUrl", transferCompleteAudioUrl: "transferCompleteAudioUrl", + contextEngineeringPlan: { + type: "lastNMessages", + maxMessages: 1.1, + }, twiml: "twiml", sipHeadersInReferToEnabled: true, fallbackPlan: { @@ -755,6 +818,7 @@ describe("PhoneNumbers", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", diff --git a/tests/wire/providerResources.test.ts b/tests/wire/providerResources.test.ts index 36691ba1..93fcf984 100644 --- a/tests/wire/providerResources.test.ts +++ b/tests/wire/providerResources.test.ts @@ -1,15 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; -import { VapiClient } from "../../src/Client"; import * as Vapi from "../../src/api/index"; +import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("ProviderResources", () => { +describe("ProviderResourcesClient", () => { test("ProviderResourceController_getProviderResourcesPaginated", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { results: [ @@ -49,25 +47,10 @@ describe("ProviderResources", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.providerResources.providerResourceControllerGetProviderResourcesPaginated( - "11labs", - "pronunciation-dictionary", - { - id: "id", - resourceId: "resourceId", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }, - ); + const response = await client.providerResources.providerResourceControllerGetProviderResourcesPaginated({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + }); expect(response).toEqual({ results: [ { @@ -102,7 +85,7 @@ describe("ProviderResources", () => { test("ProviderResourceController_createProviderResource", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { id: "id", @@ -131,10 +114,10 @@ describe("ProviderResources", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.providerResources.providerResourceControllerCreateProviderResource( - "11labs", - "pronunciation-dictionary", - ); + const response = await client.providerResources.providerResourceControllerCreateProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + }); expect(response).toEqual({ id: "id", orgId: "orgId", @@ -158,7 +141,7 @@ describe("ProviderResources", () => { test("ProviderResourceController_getProviderResource (1)", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { id: "id", @@ -187,11 +170,11 @@ describe("ProviderResources", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.providerResources.providerResourceControllerGetProviderResource( - "11labs", - "pronunciation-dictionary", - "id", - ); + const response = await client.providerResources.providerResourceControllerGetProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id", + }); expect(response).toEqual({ id: "id", orgId: "orgId", @@ -215,7 +198,7 @@ describe("ProviderResources", () => { test("ProviderResourceController_getProviderResource (2)", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; server @@ -227,17 +210,17 @@ describe("ProviderResources", () => { .build(); await expect(async () => { - return await client.providerResources.providerResourceControllerGetProviderResource( - "11labs", - "pronunciation-dictionary", - "id", - ); + return await client.providerResources.providerResourceControllerGetProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id", + }); }).rejects.toThrow(Vapi.NotFoundError); }); test("ProviderResourceController_deleteProviderResource (1)", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { id: "id", @@ -266,11 +249,11 @@ describe("ProviderResources", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.providerResources.providerResourceControllerDeleteProviderResource( - "11labs", - "pronunciation-dictionary", - "id", - ); + const response = await client.providerResources.providerResourceControllerDeleteProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id", + }); expect(response).toEqual({ id: "id", orgId: "orgId", @@ -294,7 +277,7 @@ describe("ProviderResources", () => { test("ProviderResourceController_deleteProviderResource (2)", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; server @@ -306,17 +289,17 @@ describe("ProviderResources", () => { .build(); await expect(async () => { - return await client.providerResources.providerResourceControllerDeleteProviderResource( - "11labs", - "pronunciation-dictionary", - "id", - ); + return await client.providerResources.providerResourceControllerDeleteProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id", + }); }).rejects.toThrow(Vapi.NotFoundError); }); test("ProviderResourceController_updateProviderResource (1)", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { id: "id", @@ -345,11 +328,11 @@ describe("ProviderResources", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.providerResources.providerResourceControllerUpdateProviderResource( - "11labs", - "pronunciation-dictionary", - "id", - ); + const response = await client.providerResources.providerResourceControllerUpdateProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id", + }); expect(response).toEqual({ id: "id", orgId: "orgId", @@ -373,7 +356,7 @@ describe("ProviderResources", () => { test("ProviderResourceController_updateProviderResource (2)", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; server @@ -385,11 +368,11 @@ describe("ProviderResources", () => { .build(); await expect(async () => { - return await client.providerResources.providerResourceControllerUpdateProviderResource( - "11labs", - "pronunciation-dictionary", - "id", - ); + return await client.providerResources.providerResourceControllerUpdateProviderResource({ + provider: "11labs", + resourceName: "pronunciation-dictionary", + id: "id", + }); }).rejects.toThrow(Vapi.NotFoundError); }); }); diff --git a/tests/wire/sessions.test.ts b/tests/wire/sessions.test.ts index 9845a086..c86e1032 100644 --- a/tests/wire/sessions.test.ts +++ b/tests/wire/sessions.test.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Sessions", () => { +describe("SessionsClient", () => { test("list", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { results: [ @@ -17,6 +15,10 @@ describe("Sessions", () => { orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [ + { type: "model", model: { key: "value" }, promptTokens: 1.1, completionTokens: 1.1, cost: 1.1 }, + ], name: "name", status: "active", expirationSeconds: 86400, @@ -49,8 +51,36 @@ describe("Sessions", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -72,23 +102,7 @@ describe("Sessions", () => { }; server.mockEndpoint().get("/session").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.sessions.list({ - name: "name", - assistantId: "assistantId", - squadId: "squadId", - workflowId: "workflowId", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.sessions.list(); expect(response).toEqual({ results: [ { @@ -96,6 +110,18 @@ describe("Sessions", () => { orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [ + { + type: "model", + model: { + key: "value", + }, + promptTokens: 1.1, + completionTokens: 1.1, + cost: 1.1, + }, + ], name: "name", status: "active", expirationSeconds: 86400, @@ -136,8 +162,36 @@ describe("Sessions", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -178,13 +232,15 @@ describe("Sessions", () => { test("create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [{ type: "model", model: { key: "value" }, promptTokens: 1.1, completionTokens: 1.1, cost: 1.1 }], name: "name", status: "active", expirationSeconds: 86400, @@ -217,7 +273,7 @@ describe("Sessions", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -225,7 +281,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -234,7 +300,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -249,14 +326,33 @@ describe("Sessions", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -270,6 +366,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -282,9 +379,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -339,6 +437,10 @@ describe("Sessions", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -412,9 +514,15 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -453,7 +561,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -467,6 +575,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -479,9 +588,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -494,7 +604,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -531,7 +651,57 @@ describe("Sessions", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -542,7 +712,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, }, @@ -581,7 +762,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -595,6 +776,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -607,9 +789,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -622,7 +805,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -659,7 +852,57 @@ describe("Sessions", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -670,7 +913,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, number: "number", @@ -705,14 +959,20 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, }, artifact: { messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, transcript: "transcript", pcapUrl: "pcapUrl", @@ -726,9 +986,15 @@ describe("Sessions", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, }; server @@ -746,6 +1012,18 @@ describe("Sessions", () => { orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [ + { + type: "model", + model: { + key: "value", + }, + promptTokens: 1.1, + completionTokens: 1.1, + cost: 1.1, + }, + ], name: "name", status: "active", expirationSeconds: 86400, @@ -780,7 +1058,7 @@ describe("Sessions", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -797,6 +1075,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -806,12 +1098,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -833,6 +1140,22 @@ describe("Sessions", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -848,11 +1171,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -866,6 +1185,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -878,9 +1198,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -978,6 +1299,21 @@ describe("Sessions", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1059,6 +1395,7 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -1069,6 +1406,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -1123,9 +1474,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1139,6 +1488,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1151,9 +1501,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1195,6 +1546,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1248,6 +1613,52 @@ describe("Sessions", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -1259,12 +1670,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1322,9 +1748,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1338,6 +1762,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1350,9 +1775,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1394,6 +1820,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1447,6 +1887,52 @@ describe("Sessions", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -1458,12 +1944,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1510,6 +2011,7 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -1520,6 +2022,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1535,7 +2051,7 @@ describe("Sessions", () => { ], messagesOpenAIFormatted: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -1558,24 +2074,34 @@ describe("Sessions", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value", }, + scorecards: { + key: "value", + }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, }); }); test("get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [{ type: "model", model: { key: "value" }, promptTokens: 1.1, completionTokens: 1.1, cost: 1.1 }], name: "name", status: "active", expirationSeconds: 86400, @@ -1608,7 +2134,7 @@ describe("Sessions", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -1616,7 +2142,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -1625,7 +2161,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -1640,14 +2187,33 @@ describe("Sessions", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1661,6 +2227,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1673,9 +2240,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -1730,6 +2298,10 @@ describe("Sessions", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1803,9 +2375,15 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -1844,7 +2422,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1858,6 +2436,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1870,9 +2449,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -1885,7 +2465,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -1922,7 +2512,57 @@ describe("Sessions", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -1933,7 +2573,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, }, @@ -1972,7 +2623,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1986,6 +2637,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1998,9 +2650,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -2013,7 +2666,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -2050,7 +2713,57 @@ describe("Sessions", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -2061,7 +2774,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, number: "number", @@ -2096,14 +2820,20 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, }, artifact: { messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, transcript: "transcript", pcapUrl: "pcapUrl", @@ -2117,19 +2847,39 @@ describe("Sessions", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, }; server.mockEndpoint().get("/session/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.sessions.get("id"); + const response = await client.sessions.get({ + id: "id", + }); expect(response).toEqual({ id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [ + { + type: "model", + model: { + key: "value", + }, + promptTokens: 1.1, + completionTokens: 1.1, + cost: 1.1, + }, + ], name: "name", status: "active", expirationSeconds: 86400, @@ -2164,7 +2914,7 @@ describe("Sessions", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -2181,21 +2931,50 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, - }, - }, - ], + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], + }, + }, + ], toolIds: ["toolIds"], knowledgeBase: { provider: "custom-knowledge-base", server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2217,6 +2996,22 @@ describe("Sessions", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -2232,11 +3027,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2250,6 +3041,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2262,9 +3054,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -2362,6 +3155,21 @@ describe("Sessions", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2443,6 +3251,7 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -2453,6 +3262,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -2507,9 +3330,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2523,6 +3344,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2535,9 +3357,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -2579,6 +3402,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -2632,6 +3469,52 @@ describe("Sessions", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -2643,12 +3526,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2706,9 +3604,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2722,6 +3618,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2734,9 +3631,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -2778,6 +3676,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -2831,6 +3743,52 @@ describe("Sessions", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -2842,12 +3800,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2894,6 +3867,7 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -2904,6 +3878,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2919,7 +3907,7 @@ describe("Sessions", () => { ], messagesOpenAIFormatted: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -2942,24 +3930,34 @@ describe("Sessions", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value", }, + scorecards: { + key: "value", + }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, }); }); test("delete", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [{ type: "model", model: { key: "value" }, promptTokens: 1.1, completionTokens: 1.1, cost: 1.1 }], name: "name", status: "active", expirationSeconds: 86400, @@ -2992,7 +3990,7 @@ describe("Sessions", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -3000,7 +3998,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -3009,7 +4017,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -3024,14 +4043,33 @@ describe("Sessions", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3045,6 +4083,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3057,9 +4096,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -3114,6 +4154,10 @@ describe("Sessions", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3187,9 +4231,15 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -3228,7 +4278,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3242,6 +4292,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3254,9 +4305,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -3269,7 +4321,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -3306,7 +4368,57 @@ describe("Sessions", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -3317,7 +4429,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, }, @@ -3356,7 +4479,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3370,6 +4493,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3382,9 +4506,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -3397,7 +4522,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -3434,7 +4569,57 @@ describe("Sessions", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -3445,7 +4630,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, number: "number", @@ -3480,14 +4676,20 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, }, artifact: { messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, transcript: "transcript", pcapUrl: "pcapUrl", @@ -3501,19 +4703,39 @@ describe("Sessions", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, }; server.mockEndpoint().delete("/session/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.sessions.delete("id"); + const response = await client.sessions.delete({ + id: "id", + }); expect(response).toEqual({ id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [ + { + type: "model", + model: { + key: "value", + }, + promptTokens: 1.1, + completionTokens: 1.1, + cost: 1.1, + }, + ], name: "name", status: "active", expirationSeconds: 86400, @@ -3548,7 +4770,7 @@ describe("Sessions", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -3565,6 +4787,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3574,12 +4810,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -3601,6 +4852,22 @@ describe("Sessions", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -3616,11 +4883,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3634,6 +4897,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3646,9 +4910,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -3746,6 +5011,21 @@ describe("Sessions", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3827,6 +5107,7 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -3837,6 +5118,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -3891,9 +5186,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3907,6 +5200,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3919,9 +5213,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -3963,6 +5258,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -4016,6 +5325,52 @@ describe("Sessions", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -4027,12 +5382,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -4090,9 +5460,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -4106,6 +5474,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -4118,9 +5487,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -4162,6 +5532,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -4215,6 +5599,52 @@ describe("Sessions", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -4226,12 +5656,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -4278,6 +5723,7 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -4288,6 +5734,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -4303,7 +5763,7 @@ describe("Sessions", () => { ], messagesOpenAIFormatted: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -4326,24 +5786,34 @@ describe("Sessions", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value", }, + scorecards: { + key: "value", + }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, }); }); test("update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [{ type: "model", model: { key: "value" }, promptTokens: 1.1, completionTokens: 1.1, cost: 1.1 }], name: "name", status: "active", expirationSeconds: 86400, @@ -4376,7 +5846,7 @@ describe("Sessions", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -4384,7 +5854,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -4393,7 +5873,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -4408,14 +5899,33 @@ describe("Sessions", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -4429,6 +5939,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -4441,9 +5952,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -4498,6 +6010,10 @@ describe("Sessions", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -4571,9 +6087,15 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -4612,7 +6134,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -4626,6 +6148,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -4638,9 +6161,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -4653,7 +6177,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -4690,7 +6224,57 @@ describe("Sessions", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -4701,7 +6285,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, }, @@ -4740,7 +6335,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -4754,6 +6349,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -4766,9 +6362,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -4781,7 +6378,17 @@ describe("Sessions", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -4818,7 +6425,57 @@ describe("Sessions", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -4829,7 +6486,18 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, number: "number", @@ -4864,14 +6532,20 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, }, artifact: { messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }], - messagesOpenAIFormatted: [{ content: undefined, role: "assistant" }], + messagesOpenAIFormatted: [{ content: null, role: "assistant" }], recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 }, transcript: "transcript", pcapUrl: "pcapUrl", @@ -4885,9 +6559,15 @@ describe("Sessions", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value" }, + scorecards: { key: "value" }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, }; server @@ -4899,12 +6579,26 @@ describe("Sessions", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.sessions.update("id"); + const response = await client.sessions.update({ + id: "id", + }); expect(response).toEqual({ id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", updatedAt: "2024-01-15T09:30:00Z", + cost: 1.1, + costs: [ + { + type: "model", + model: { + key: "value", + }, + promptTokens: 1.1, + completionTokens: 1.1, + cost: 1.1, + }, + ], name: "name", status: "active", expirationSeconds: 86400, @@ -4939,7 +6633,7 @@ describe("Sessions", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -4956,6 +6650,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -4965,12 +6673,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -4992,6 +6715,22 @@ describe("Sessions", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -5007,11 +6746,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -5025,6 +6760,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -5037,9 +6773,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -5137,6 +6874,21 @@ describe("Sessions", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -5218,6 +6970,7 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -5228,6 +6981,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -5282,9 +7049,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -5298,6 +7063,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -5310,9 +7076,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -5354,6 +7121,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -5407,6 +7188,52 @@ describe("Sessions", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -5418,12 +7245,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -5481,9 +7323,7 @@ describe("Sessions", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -5497,6 +7337,7 @@ describe("Sessions", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -5509,9 +7350,10 @@ describe("Sessions", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -5553,6 +7395,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -5606,6 +7462,52 @@ describe("Sessions", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -5617,12 +7519,27 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -5669,6 +7586,7 @@ describe("Sessions", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -5679,6 +7597,20 @@ describe("Sessions", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -5694,7 +7626,7 @@ describe("Sessions", () => { ], messagesOpenAIFormatted: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -5717,11 +7649,19 @@ describe("Sessions", () => { transcriberLatencyAverage: 1.1, endpointingLatencyAverage: 1.1, turnLatencyAverage: 1.1, + fromTransportLatencyAverage: 1.1, + toTransportLatencyAverage: 1.1, + numUserInterrupted: 1.1, + numAssistantInterrupted: 1.1, }, structuredOutputs: { key: "value", }, + scorecards: { + key: "value", + }, transfers: ["transfers"], + structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z", }, }); }); diff --git a/tests/wire/squads.test.ts b/tests/wire/squads.test.ts index 18ad57df..e0406c7c 100644 --- a/tests/wire/squads.test.ts +++ b/tests/wire/squads.test.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Squads", () => { +describe("SquadsClient", () => { test("list", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = [ { @@ -45,7 +43,7 @@ describe("Squads", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { provider: "google" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -59,6 +57,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -71,9 +70,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"] }, @@ -86,7 +86,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -123,7 +133,57 @@ describe("Squads", () => { loggingUseCustomStorageEnabled: true, }, startSpeakingPlan: { waitSeconds: 0.4 }, - stopSpeakingPlan: { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1 }, + stopSpeakingPlan: { + numWords: 0, + voiceSeconds: 0.2, + backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], + }, monitorPlan: { listenEnabled: false, listenAuthenticationEnabled: false, @@ -134,7 +194,18 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, id: "id", @@ -145,17 +216,7 @@ describe("Squads", () => { ]; server.mockEndpoint().get("/squad").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.squads.list({ - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.squads.list(); expect(response).toEqual([ { name: "name", @@ -202,9 +263,7 @@ describe("Squads", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - provider: "google", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -218,6 +277,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -230,9 +290,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -274,6 +335,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -327,6 +402,52 @@ describe("Squads", () => { numWords: 0, voiceSeconds: 0.2, backoffSeconds: 1, + acknowledgementPhrases: [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure", + ], + interruptionPhrases: [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually", + ], }, monitorPlan: { listenEnabled: false, @@ -338,12 +459,27 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -357,7 +493,7 @@ describe("Squads", () => { test("create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { members: [{}] }; const rawResponseBody = { name: "name", @@ -393,8 +529,36 @@ describe("Squads", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -426,8 +590,36 @@ describe("Squads", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -461,7 +653,7 @@ describe("Squads", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -469,7 +661,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -478,7 +680,18 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -493,14 +706,33 @@ describe("Squads", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -514,6 +746,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -526,9 +759,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -541,7 +775,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -594,6 +838,10 @@ describe("Squads", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -667,9 +915,15 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -737,8 +991,36 @@ describe("Squads", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -783,8 +1065,36 @@ describe("Squads", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -825,7 +1135,7 @@ describe("Squads", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -842,6 +1152,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -851,12 +1175,27 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -878,6 +1217,22 @@ describe("Squads", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -893,11 +1248,7 @@ describe("Squads", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -911,6 +1262,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -923,9 +1275,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -970,6 +1323,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1042,6 +1409,21 @@ describe("Squads", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1123,6 +1505,7 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -1133,6 +1516,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -1150,7 +1547,7 @@ describe("Squads", () => { test("get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { name: "name", @@ -1186,8 +1583,36 @@ describe("Squads", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -1219,8 +1644,36 @@ describe("Squads", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -1254,7 +1707,7 @@ describe("Squads", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -1262,7 +1715,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -1271,7 +1734,18 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -1286,14 +1760,33 @@ describe("Squads", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1307,6 +1800,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1319,9 +1813,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -1334,7 +1829,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -1387,6 +1892,10 @@ describe("Squads", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1460,9 +1969,15 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -1473,7 +1988,9 @@ describe("Squads", () => { }; server.mockEndpoint().get("/squad/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.squads.get("id"); + const response = await client.squads.get({ + id: "id", + }); expect(response).toEqual({ name: "name", members: [ @@ -1521,8 +2038,36 @@ describe("Squads", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -1567,8 +2112,36 @@ describe("Squads", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -1609,7 +2182,7 @@ describe("Squads", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -1626,6 +2199,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1635,12 +2222,27 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -1662,6 +2264,22 @@ describe("Squads", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -1677,11 +2295,7 @@ describe("Squads", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -1695,6 +2309,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -1707,9 +2322,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -1754,6 +2370,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -1826,6 +2456,21 @@ describe("Squads", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -1907,6 +2552,7 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -1917,6 +2563,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -1934,7 +2594,7 @@ describe("Squads", () => { test("delete", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { name: "name", @@ -1970,8 +2630,36 @@ describe("Squads", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -2003,8 +2691,36 @@ describe("Squads", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -2038,7 +2754,7 @@ describe("Squads", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -2046,7 +2762,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -2055,7 +2781,18 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -2070,14 +2807,33 @@ describe("Squads", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2091,6 +2847,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2103,9 +2860,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -2118,7 +2876,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -2171,6 +2939,10 @@ describe("Squads", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2244,9 +3016,15 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -2257,7 +3035,9 @@ describe("Squads", () => { }; server.mockEndpoint().delete("/squad/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.squads.delete("id"); + const response = await client.squads.delete({ + id: "id", + }); expect(response).toEqual({ name: "name", members: [ @@ -2305,8 +3085,36 @@ describe("Squads", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -2351,8 +3159,36 @@ describe("Squads", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -2393,7 +3229,7 @@ describe("Squads", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -2410,6 +3246,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -2419,12 +3269,27 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -2446,6 +3311,22 @@ describe("Squads", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -2461,11 +3342,7 @@ describe("Squads", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2479,6 +3356,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2491,9 +3369,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -2538,6 +3417,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -2610,6 +3503,21 @@ describe("Squads", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -2691,6 +3599,7 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -2701,6 +3610,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { @@ -2718,7 +3641,7 @@ describe("Squads", () => { test("update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { members: [{}] }; const rawResponseBody = { name: "name", @@ -2754,8 +3677,36 @@ describe("Squads", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -2787,8 +3738,36 @@ describe("Squads", () => { fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [{ provider: "11labs", apiKey: "apiKey" }], }, @@ -2822,7 +3801,7 @@ describe("Squads", () => { }, }, model: { - messages: [{ content: undefined, role: "assistant" }], + messages: [{ content: null, role: "assistant" }], tools: [ { type: "apiRequest", @@ -2830,7 +3809,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], toolIds: ["toolIds"], @@ -2839,7 +3828,18 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + staticIpAddressesEnabled: false, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, }, model: "claude-3-opus-20240229", @@ -2854,14 +3854,33 @@ describe("Squads", () => { cachingEnabled: true, provider: "azure", voiceId: "andrew", - chunkPlan: { enabled: true, minCharacters: 30 }, + chunkPlan: { + enabled: true, + minCharacters: 30, + punctuationBoundaries: [ + "。", + ",", + ".", + "!", + "?", + ";", + "،", + "۔", + "।", + "॥", + "|", + "||", + ",", + ":", + ], + }, speed: 1.1, fallbackPlan: { voices: [{ cachingEnabled: true, provider: "azure", voiceId: "andrew" }] }, }, firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { beepMaxAwaitSeconds: 1.1, provider: "google", type: "audio" }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -2875,6 +3894,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -2887,9 +3907,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }], observabilityPlan: { provider: "langfuse", tags: ["tags"], metadata: { key: "value" } }, @@ -2902,7 +3923,17 @@ describe("Squads", () => { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", url: "url", - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [ + { key: "value" }, + { key: "value" }, + { key: "value" }, + { key: "value" }, + ], + }, }, ], variableValues: { key: "value" }, @@ -2955,6 +3986,10 @@ describe("Squads", () => { transcriptPlan: { enabled: true }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3028,9 +4063,15 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value" }, - backoffPlan: { type: { key: "value" }, maxRetries: 0, baseDelaySeconds: 1 }, + backoffPlan: { + type: { key: "value" }, + maxRetries: 0, + baseDelaySeconds: 1, + excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }], + }, }, keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" }, }, @@ -3048,7 +4089,8 @@ describe("Squads", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.squads.update("id", { + const response = await client.squads.update({ + id: "id", members: [{}], }); expect(response).toEqual({ @@ -3098,8 +4140,36 @@ describe("Squads", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -3144,8 +4214,36 @@ describe("Squads", () => { }, }, firstMessage: "Hello! How can I help you today?", + clientMessages: [ + "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", + ], + serverMessages: [ + "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", + ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, credentials: [ { @@ -3186,7 +4284,7 @@ describe("Squads", () => { model: { messages: [ { - content: undefined, + content: null, role: "assistant", }, ], @@ -3203,6 +4301,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3212,12 +4324,27 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, backoffPlan: { type: { key: "value", }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, }, @@ -3239,6 +4366,22 @@ describe("Squads", () => { chunkPlan: { enabled: true, minCharacters: 30, + punctuationBoundaries: [ + "\u3002", + "\uFF0C", + ".", + "!", + "?", + ";", + "\u060C", + "\u06D4", + "\u0964", + "\u0965", + "|", + "||", + ",", + ":", + ], }, speed: 1.1, fallbackPlan: { @@ -3254,11 +4397,7 @@ describe("Squads", () => { firstMessage: "Hello! How can I help you today?", firstMessageInterruptionsEnabled: true, firstMessageMode: "assistant-speaks-first", - voicemailDetection: { - beepMaxAwaitSeconds: 1.1, - provider: "google", - type: "audio", - }, + voicemailDetection: "off", clientMessages: [ "conversation-update", "function-call", @@ -3272,6 +4411,7 @@ describe("Squads", () => { "user-interrupted", "voice-input", "workflow.node.started", + "assistant.started", ], serverMessages: [ "conversation-update", @@ -3284,9 +4424,10 @@ describe("Squads", () => { "transfer-destination-request", "handoff-destination-request", "user-interrupted", + "assistant.started", ], maxDurationSeconds: 600, - backgroundSound: "off", + backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3", modelOutputInMessagesEnabled: false, transportConfigurations: [ { @@ -3331,6 +4472,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, ], @@ -3403,6 +4558,21 @@ describe("Squads", () => { }, recordingPath: "recordingPath", structuredOutputIds: ["structuredOutputIds"], + scorecardIds: ["scorecardIds"], + scorecards: [ + { + metrics: [ + { + structuredOutputId: "structuredOutputId", + conditions: [ + { + key: "value", + }, + ], + }, + ], + }, + ], loggingPath: "loggingPath", }, startSpeakingPlan: { @@ -3484,6 +4654,7 @@ describe("Squads", () => { server: { timeoutSeconds: 20, credentialId: "550e8400-e29b-41d4-a716-446655440000", + staticIpAddressesEnabled: false, url: "url", headers: { key: "value", @@ -3494,6 +4665,20 @@ describe("Squads", () => { }, maxRetries: 0, baseDelaySeconds: 1, + excludedStatusCodes: [ + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + { + key: "value", + }, + ], }, }, keypadInputPlan: { diff --git a/tests/wire/structuredOutputs.test.ts b/tests/wire/structuredOutputs.test.ts index e21f5ba8..2a785868 100644 --- a/tests/wire/structuredOutputs.test.ts +++ b/tests/wire/structuredOutputs.test.ts @@ -1,19 +1,18 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("StructuredOutputs", () => { +describe("StructuredOutputsClient", () => { test("StructuredOutputController_findAll", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { results: [ { - model: { provider: "openai", model: "gpt-5" }, + model: { provider: "openai", model: "gpt-5.1" }, + compliancePlan: { forceStoreOnHipaaEnabled: false }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -36,27 +35,16 @@ describe("StructuredOutputs", () => { }; server.mockEndpoint().get("/structured-output").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.structuredOutputs.structuredOutputControllerFindAll({ - id: "id", - name: "name", - page: 1.1, - sortOrder: "ASC", - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.structuredOutputs.structuredOutputControllerFindAll(); expect(response).toEqual({ results: [ { model: { provider: "openai", - model: "gpt-5", + model: "gpt-5.1", + }, + compliancePlan: { + forceStoreOnHipaaEnabled: false, }, id: "id", orgId: "orgId", @@ -84,10 +72,11 @@ describe("StructuredOutputs", () => { test("StructuredOutputController_create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name", schema: { type: "string" } }; const rawResponseBody = { - model: { provider: "openai", model: "gpt-5", temperature: 1.1, maxTokens: 1.1 }, + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, + compliancePlan: { forceStoreOnHipaaEnabled: false }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -126,10 +115,13 @@ describe("StructuredOutputs", () => { expect(response).toEqual({ model: { provider: "openai", - model: "gpt-5", + model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1, }, + compliancePlan: { + forceStoreOnHipaaEnabled: false, + }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -158,10 +150,11 @@ describe("StructuredOutputs", () => { test("StructuredOutputController_findOne", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { - model: { provider: "openai", model: "gpt-5", temperature: 1.1, maxTokens: 1.1 }, + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, + compliancePlan: { forceStoreOnHipaaEnabled: false }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -190,14 +183,19 @@ describe("StructuredOutputs", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.structuredOutputs.structuredOutputControllerFindOne("id"); + const response = await client.structuredOutputs.structuredOutputControllerFindOne({ + id: "id", + }); expect(response).toEqual({ model: { provider: "openai", - model: "gpt-5", + model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1, }, + compliancePlan: { + forceStoreOnHipaaEnabled: false, + }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -226,10 +224,11 @@ describe("StructuredOutputs", () => { test("StructuredOutputController_remove", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { - model: { provider: "openai", model: "gpt-5", temperature: 1.1, maxTokens: 1.1 }, + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, + compliancePlan: { forceStoreOnHipaaEnabled: false }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -258,14 +257,19 @@ describe("StructuredOutputs", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.structuredOutputs.structuredOutputControllerRemove("id"); + const response = await client.structuredOutputs.structuredOutputControllerRemove({ + id: "id", + }); expect(response).toEqual({ model: { provider: "openai", - model: "gpt-5", + model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1, }, + compliancePlan: { + forceStoreOnHipaaEnabled: false, + }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -294,10 +298,11 @@ describe("StructuredOutputs", () => { test("StructuredOutputController_update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { - model: { provider: "openai", model: "gpt-5", temperature: 1.1, maxTokens: 1.1 }, + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, + compliancePlan: { forceStoreOnHipaaEnabled: false }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -327,16 +332,95 @@ describe("StructuredOutputs", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.structuredOutputs.structuredOutputControllerUpdate("id", { + const response = await client.structuredOutputs.structuredOutputControllerUpdate({ + id: "id", schemaOverride: "schemaOverride", }); expect(response).toEqual({ model: { provider: "openai", - model: "gpt-5", + model: "gpt-5.1", + temperature: 1.1, + maxTokens: 1.1, + }, + compliancePlan: { + forceStoreOnHipaaEnabled: false, + }, + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + assistantIds: ["assistantIds"], + workflowIds: ["workflowIds"], + schema: { + type: "string", + items: { + key: "value", + }, + properties: { + key: "value", + }, + description: "description", + pattern: "pattern", + format: "date-time", + required: ["required"], + enum: ["enum"], + title: "title", + }, + }); + }); + + test("StructuredOutputController_run", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { callIds: ["callIds"] }; + const rawResponseBody = { + model: { provider: "openai", model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1 }, + compliancePlan: { forceStoreOnHipaaEnabled: false }, + id: "id", + orgId: "orgId", + createdAt: "2024-01-15T09:30:00Z", + updatedAt: "2024-01-15T09:30:00Z", + name: "name", + description: "description", + assistantIds: ["assistantIds"], + workflowIds: ["workflowIds"], + schema: { + type: "string", + items: { key: "value" }, + properties: { key: "value" }, + description: "description", + pattern: "pattern", + format: "date-time", + required: ["required"], + enum: ["enum"], + title: "title", + }, + }; + server + .mockEndpoint() + .post("/structured-output/run") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.structuredOutputs.structuredOutputControllerRun({ + callIds: ["callIds"], + }); + expect(response).toEqual({ + model: { + provider: "openai", + model: "gpt-5.1", temperature: 1.1, maxTokens: 1.1, }, + compliancePlan: { + forceStoreOnHipaaEnabled: false, + }, id: "id", orgId: "orgId", createdAt: "2024-01-15T09:30:00Z", @@ -362,4 +446,28 @@ describe("StructuredOutputs", () => { }, }); }); + + test("StructuredOutputController_suggest", async () => { + const server = mockServerPool.createServer(); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { assistantId: "550e8400-e29b-41d4-a716-446655440000" }; + const rawResponseBody = [{ key: "value" }]; + server + .mockEndpoint() + .post("/structured-output/suggest") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.structuredOutputs.structuredOutputControllerSuggest({ + assistantId: "550e8400-e29b-41d4-a716-446655440000", + }); + expect(response).toEqual([ + { + key: "value", + }, + ]); + }); }); diff --git a/tests/wire/tools.test.ts b/tests/wire/tools.test.ts index ce7f43d0..409d67cc 100644 --- a/tests/wire/tools.test.ts +++ b/tests/wire/tools.test.ts @@ -1,15 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool"; import { VapiClient } from "../../src/Client"; -import * as Vapi from "../../src/api/index"; +import { mockServerPool } from "../mock-server/MockServerPool"; -describe("Tools", () => { +describe("ToolsClient", () => { test("list", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = [ { @@ -61,17 +58,7 @@ describe("Tools", () => { ]; server.mockEndpoint().get("/tool").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.tools.list({ - limit: 1.1, - createdAtGt: "2024-01-15T09:30:00Z", - createdAtLt: "2024-01-15T09:30:00Z", - createdAtGe: "2024-01-15T09:30:00Z", - createdAtLe: "2024-01-15T09:30:00Z", - updatedAtGt: "2024-01-15T09:30:00Z", - updatedAtLt: "2024-01-15T09:30:00Z", - updatedAtGe: "2024-01-15T09:30:00Z", - updatedAtLe: "2024-01-15T09:30:00Z", - }); + const response = await client.tools.list(); expect(response).toEqual([ { messages: [ @@ -167,7 +154,7 @@ describe("Tools", () => { test("create", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "apiRequest", method: "POST", url: "url" }; const rawResponseBody = { messages: [ @@ -370,7 +357,7 @@ describe("Tools", () => { test("get", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { messages: [ @@ -441,7 +428,9 @@ describe("Tools", () => { }; server.mockEndpoint().get("/tool/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.tools.get("id"); + const response = await client.tools.get({ + id: "id", + }); expect(response).toEqual({ messages: [ { @@ -562,7 +551,7 @@ describe("Tools", () => { test("delete", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { messages: [ @@ -633,7 +622,9 @@ describe("Tools", () => { }; server.mockEndpoint().delete("/tool/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.tools.delete("id"); + const response = await client.tools.delete({ + id: "id", + }); expect(response).toEqual({ messages: [ { @@ -754,7 +745,7 @@ describe("Tools", () => { test("update", async () => { const server = mockServerPool.createServer(); - const client = new VapiClient({ token: "test", environment: server.baseUrl }); + const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; const rawResponseBody = { messages: [ @@ -832,7 +823,10 @@ describe("Tools", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.tools.update("id", {}); + const response = await client.tools.update({ + id: "id", + body: {}, + }); expect(response).toEqual({ messages: [ { diff --git a/tsconfig.base.json b/tsconfig.base.json index c75083dc..d7627675 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -9,7 +9,9 @@ "declaration": true, "outDir": "dist", "rootDir": "src", - "baseUrl": "src" + "baseUrl": "src", + "isolatedModules": true, + "isolatedDeclarations": true }, "include": ["src"], "exclude": [] diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 95a5eb73..6ce90974 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -2,7 +2,8 @@ "extends": "./tsconfig.base.json", "compilerOptions": { "module": "esnext", - "outDir": "dist/esm" + "outDir": "dist/esm", + "verbatimModuleSyntax": true }, "include": ["src"], "exclude": [] diff --git a/vitest.config.mts b/vitest.config.mts new file mode 100644 index 00000000..ba2ec4f9 --- /dev/null +++ b/vitest.config.mts @@ -0,0 +1,28 @@ +import { defineConfig } from "vitest/config"; +export default defineConfig({ + test: { + projects: [ + { + test: { + globals: true, + name: "unit", + environment: "node", + root: "./tests", + include: ["**/*.test.{js,ts,jsx,tsx}"], + exclude: ["wire/**"], + setupFiles: ["./setup.ts"], + }, + }, + { + test: { + globals: true, + name: "wire", + environment: "node", + root: "./tests/wire", + setupFiles: ["../setup.ts", "../mock-server/setup.ts"], + }, + }, + ], + passWithNoTests: true, + }, +}); diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index af10758f..00000000 --- a/yarn.lock +++ /dev/null @@ -1,3228 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" - integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== - dependencies: - "@babel/helper-validator-identifier" "^7.27.1" - js-tokens "^4.0.0" - picocolors "^1.1.1" - -"@babel/compat-data@^7.27.2": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.4.tgz#96fdf1af1b8859c8474ab39c295312bfb7c24b04" - integrity sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw== - -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.4.tgz#12a550b8794452df4c8b084f95003bce1742d496" - integrity sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.3" - "@babel/helper-compilation-targets" "^7.27.2" - "@babel/helper-module-transforms" "^7.28.3" - "@babel/helpers" "^7.28.4" - "@babel/parser" "^7.28.4" - "@babel/template" "^7.27.2" - "@babel/traverse" "^7.28.4" - "@babel/types" "^7.28.4" - "@jridgewell/remapping" "^2.3.5" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/generator@^7.28.3", "@babel/generator@^7.7.2": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.3.tgz#9626c1741c650cbac39121694a0f2d7451b8ef3e" - integrity sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw== - dependencies: - "@babel/parser" "^7.28.3" - "@babel/types" "^7.28.2" - "@jridgewell/gen-mapping" "^0.3.12" - "@jridgewell/trace-mapping" "^0.3.28" - jsesc "^3.0.2" - -"@babel/helper-compilation-targets@^7.27.2": - version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" - integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== - dependencies: - "@babel/compat-data" "^7.27.2" - "@babel/helper-validator-option" "^7.27.1" - browserslist "^4.24.0" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-globals@^7.28.0": - version "7.28.0" - resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" - integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== - -"@babel/helper-module-imports@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" - integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== - dependencies: - "@babel/traverse" "^7.27.1" - "@babel/types" "^7.27.1" - -"@babel/helper-module-transforms@^7.28.3": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz#a2b37d3da3b2344fe085dab234426f2b9a2fa5f6" - integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw== - dependencies: - "@babel/helper-module-imports" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" - "@babel/traverse" "^7.28.3" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c" - integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw== - -"@babel/helper-string-parser@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" - integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== - -"@babel/helper-validator-identifier@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8" - integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== - -"@babel/helper-validator-option@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" - integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== - -"@babel/helpers@^7.28.4": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" - integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== - dependencies: - "@babel/template" "^7.27.2" - "@babel/types" "^7.28.4" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.3", "@babel/parser@^7.28.4": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.4.tgz#da25d4643532890932cc03f7705fe19637e03fa8" - integrity sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg== - dependencies: - "@babel/types" "^7.28.4" - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz#34c017d54496f9b11b61474e7ea3dfd5563ffe07" - integrity sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww== - dependencies: - "@babel/helper-plugin-utils" "^7.27.1" - -"@babel/plugin-syntax-import-meta@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.7.2": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz#2f9beb5eff30fa507c5532d107daac7b888fa34c" - integrity sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w== - dependencies: - "@babel/helper-plugin-utils" "^7.27.1" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz#5147d29066a793450f220c63fa3a9431b7e6dd18" - integrity sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ== - dependencies: - "@babel/helper-plugin-utils" "^7.27.1" - -"@babel/template@^7.27.2", "@babel/template@^7.3.3": - version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" - integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/parser" "^7.27.2" - "@babel/types" "^7.27.1" - -"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.4": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.4.tgz#8d456101b96ab175d487249f60680221692b958b" - integrity sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.3" - "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.28.4" - "@babel/template" "^7.27.2" - "@babel/types" "^7.28.4" - debug "^4.3.1" - -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4", "@babel/types@^7.3.3": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a" - integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q== - dependencies: - "@babel/helper-string-parser" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@bundled-es-modules/cookie@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@bundled-es-modules/cookie/-/cookie-2.0.1.tgz#b41376af6a06b3e32a15241d927b840a9b4de507" - integrity sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw== - dependencies: - cookie "^0.7.2" - -"@bundled-es-modules/statuses@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz#761d10f44e51a94902c4da48675b71a76cc98872" - integrity sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg== - dependencies: - statuses "^2.0.1" - -"@inquirer/ansi@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.0.tgz#29525c673caf36c12e719712830705b9c31f0462" - integrity sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA== - -"@inquirer/confirm@^5.0.0": - version "5.1.18" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.18.tgz#0b76e5082d834c0e3528023705b867fc1222d535" - integrity sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw== - dependencies: - "@inquirer/core" "^10.2.2" - "@inquirer/type" "^3.0.8" - -"@inquirer/core@^10.2.2": - version "10.2.2" - resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.2.2.tgz#d31eb50ba0c76b26e7703c2c0d1d0518144c23ab" - integrity sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA== - dependencies: - "@inquirer/ansi" "^1.0.0" - "@inquirer/figures" "^1.0.13" - "@inquirer/type" "^3.0.8" - cli-width "^4.1.0" - mute-stream "^2.0.0" - signal-exit "^4.1.0" - wrap-ansi "^6.2.0" - yoctocolors-cjs "^2.1.2" - -"@inquirer/figures@^1.0.13": - version "1.0.13" - resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.13.tgz#ad0afd62baab1c23175115a9b62f511b6a751e45" - integrity sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw== - -"@inquirer/type@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.8.tgz#efc293ba0ed91e90e6267f1aacc1c70d20b8b4e8" - integrity sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" - integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - -"@jest/core@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" - integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== - dependencies: - "@jest/console" "^29.7.0" - "@jest/reporters" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.7.0" - jest-config "^29.7.0" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-resolve-dependencies "^29.7.0" - jest-runner "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - jest-watcher "^29.7.0" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" - integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== - dependencies: - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - -"@jest/expect-utils@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" - integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== - dependencies: - jest-get-type "^29.6.3" - -"@jest/expect@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" - integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== - dependencies: - expect "^29.7.0" - jest-snapshot "^29.7.0" - -"@jest/fake-timers@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" - integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== - dependencies: - "@jest/types" "^29.6.3" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -"@jest/globals@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" - integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/types" "^29.6.3" - jest-mock "^29.7.0" - -"@jest/reporters@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" - integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^6.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - jest-worker "^29.7.0" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - v8-to-istanbul "^9.0.1" - -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== - dependencies: - "@sinclair/typebox" "^0.27.8" - -"@jest/source-map@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" - integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.18" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" - integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== - dependencies: - "@jest/console" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" - integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== - dependencies: - "@jest/test-result" "^29.7.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - slash "^3.0.0" - -"@jest/transform@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" - integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^2.0.0" - fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.2" - -"@jest/types@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" - integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== - dependencies: - "@jest/schemas" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - -"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": - version "0.3.13" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" - integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.5.0" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/remapping@^2.3.5": - version "2.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" - integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/source-map@^0.3.3": - version "0.3.11" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.11.tgz#b21835cbd36db656b857c2ad02ebd413cc13a9ba" - integrity sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - -"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": - version "1.5.5" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" - integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== - -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.28": - version "0.3.31" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" - integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@mswjs/interceptors@^0.39.1": - version "0.39.6" - resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.39.6.tgz#44094a578f20da4749d1a0eaf3cdb7973604004b" - integrity sha512-bndDP83naYYkfayr/qhBHMhk0YGwS1iv6vaEGcr0SQbO0IZtbOPqjKjds/WcG+bJA+1T5vCx6kprKOzn5Bg+Vw== - dependencies: - "@open-draft/deferred-promise" "^2.2.0" - "@open-draft/logger" "^0.3.0" - "@open-draft/until" "^2.0.0" - is-node-process "^1.2.0" - outvariant "^1.4.3" - strict-event-emitter "^0.5.1" - -"@open-draft/deferred-promise@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz#4a822d10f6f0e316be4d67b4d4f8c9a124b073bd" - integrity sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA== - -"@open-draft/logger@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@open-draft/logger/-/logger-0.3.0.tgz#2b3ab1242b360aa0adb28b85f5d7da1c133a0954" - integrity sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ== - dependencies: - is-node-process "^1.2.0" - outvariant "^1.4.0" - -"@open-draft/until@^2.0.0", "@open-draft/until@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda" - integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== - -"@sinclair/typebox@^0.27.8": - version "0.27.8" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" - integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== - -"@sinonjs/commons@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" - integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^10.0.2": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" - integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== - dependencies: - "@sinonjs/commons" "^3.0.0" - -"@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== - -"@types/babel__core@^7.1.14": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" - integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== - dependencies: - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.27.0" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" - integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" - integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.28.0" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.28.0.tgz#07d713d6cce0d265c9849db0cbe62d3f61f36f74" - integrity sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q== - dependencies: - "@babel/types" "^7.28.2" - -"@types/cookie@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5" - integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA== - -"@types/eslint-scope@^3.7.7": - version "3.7.7" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" - integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "9.6.1" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" - integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" - integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== - -"@types/graceful-fs@^4.1.3": - version "4.1.9" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" - integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" - integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== - -"@types/istanbul-lib-report@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" - integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" - integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@^29.5.14": - version "29.5.14" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5" - integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== - dependencies: - expect "^29.0.0" - pretty-format "^29.0.0" - -"@types/jsdom@^20.0.0": - version "20.0.1" - resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808" - integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ== - dependencies: - "@types/node" "*" - "@types/tough-cookie" "*" - parse5 "^7.0.0" - -"@types/json-schema@*", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.9": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - -"@types/node@*": - version "24.5.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.5.2.tgz#52ceb83f50fe0fcfdfbd2a9fab6db2e9e7ef6446" - integrity sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ== - dependencies: - undici-types "~7.12.0" - -"@types/node@^18.19.70": - version "18.19.127" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.127.tgz#7c2e47fa79ad7486134700514d4a975c4607f09d" - integrity sha512-gSjxjrnKXML/yo0BO099uPixMqfpJU0TKYjpfLU7TrtA2WWDki412Np/RSTPRil1saKBhvVVKzVx/p/6p94nVA== - dependencies: - undici-types "~5.26.4" - -"@types/stack-utils@^2.0.0": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" - integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== - -"@types/statuses@^2.0.4": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/statuses/-/statuses-2.0.6.tgz#66748315cc9a96d63403baa8671b2c124f8633aa" - integrity sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA== - -"@types/tough-cookie@*": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" - integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== - -"@types/yargs-parser@*": - version "21.0.3" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" - integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== - -"@types/yargs@^17.0.8": - version "17.0.33" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" - integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== - dependencies: - "@types/yargs-parser" "*" - -"@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.14.1.tgz#a9f6a07f2b03c95c8d38c4536a1fdfb521ff55b6" - integrity sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ== - dependencies: - "@webassemblyjs/helper-numbers" "1.13.2" - "@webassemblyjs/helper-wasm-bytecode" "1.13.2" - -"@webassemblyjs/floating-point-hex-parser@1.13.2": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz#fcca1eeddb1cc4e7b6eed4fc7956d6813b21b9fb" - integrity sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA== - -"@webassemblyjs/helper-api-error@1.13.2": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz#e0a16152248bc38daee76dd7e21f15c5ef3ab1e7" - integrity sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ== - -"@webassemblyjs/helper-buffer@1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz#822a9bc603166531f7d5df84e67b5bf99b72b96b" - integrity sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA== - -"@webassemblyjs/helper-numbers@1.13.2": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz#dbd932548e7119f4b8a7877fd5a8d20e63490b2d" - integrity sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.13.2" - "@webassemblyjs/helper-api-error" "1.13.2" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.13.2": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz#e556108758f448aae84c850e593ce18a0eb31e0b" - integrity sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA== - -"@webassemblyjs/helper-wasm-section@1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz#9629dda9c4430eab54b591053d6dc6f3ba050348" - integrity sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw== - dependencies: - "@webassemblyjs/ast" "1.14.1" - "@webassemblyjs/helper-buffer" "1.14.1" - "@webassemblyjs/helper-wasm-bytecode" "1.13.2" - "@webassemblyjs/wasm-gen" "1.14.1" - -"@webassemblyjs/ieee754@1.13.2": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz#1c5eaace1d606ada2c7fd7045ea9356c59ee0dba" - integrity sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.13.2": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz#57c5c3deb0105d02ce25fa3fd74f4ebc9fd0bbb0" - integrity sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.13.2": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz#917a20e93f71ad5602966c2d685ae0c6c21f60f1" - integrity sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ== - -"@webassemblyjs/wasm-edit@^1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz#ac6689f502219b59198ddec42dcd496b1004d597" - integrity sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ== - dependencies: - "@webassemblyjs/ast" "1.14.1" - "@webassemblyjs/helper-buffer" "1.14.1" - "@webassemblyjs/helper-wasm-bytecode" "1.13.2" - "@webassemblyjs/helper-wasm-section" "1.14.1" - "@webassemblyjs/wasm-gen" "1.14.1" - "@webassemblyjs/wasm-opt" "1.14.1" - "@webassemblyjs/wasm-parser" "1.14.1" - "@webassemblyjs/wast-printer" "1.14.1" - -"@webassemblyjs/wasm-gen@1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz#991e7f0c090cb0bb62bbac882076e3d219da9570" - integrity sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg== - dependencies: - "@webassemblyjs/ast" "1.14.1" - "@webassemblyjs/helper-wasm-bytecode" "1.13.2" - "@webassemblyjs/ieee754" "1.13.2" - "@webassemblyjs/leb128" "1.13.2" - "@webassemblyjs/utf8" "1.13.2" - -"@webassemblyjs/wasm-opt@1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz#e6f71ed7ccae46781c206017d3c14c50efa8106b" - integrity sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw== - dependencies: - "@webassemblyjs/ast" "1.14.1" - "@webassemblyjs/helper-buffer" "1.14.1" - "@webassemblyjs/wasm-gen" "1.14.1" - "@webassemblyjs/wasm-parser" "1.14.1" - -"@webassemblyjs/wasm-parser@1.14.1", "@webassemblyjs/wasm-parser@^1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz#b3e13f1893605ca78b52c68e54cf6a865f90b9fb" - integrity sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ== - dependencies: - "@webassemblyjs/ast" "1.14.1" - "@webassemblyjs/helper-api-error" "1.13.2" - "@webassemblyjs/helper-wasm-bytecode" "1.13.2" - "@webassemblyjs/ieee754" "1.13.2" - "@webassemblyjs/leb128" "1.13.2" - "@webassemblyjs/utf8" "1.13.2" - -"@webassemblyjs/wast-printer@1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz#3bb3e9638a8ae5fdaf9610e7a06b4d9f9aa6fe07" - integrity sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw== - dependencies: - "@webassemblyjs/ast" "1.14.1" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -abab@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" - integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== - -acorn-globals@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" - integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== - dependencies: - acorn "^8.1.0" - acorn-walk "^8.0.2" - -acorn-import-phases@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz#16eb850ba99a056cb7cbfe872ffb8972e18c8bd7" - integrity sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ== - -acorn-walk@^8.0.2: - version "8.3.4" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" - integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== - dependencies: - acorn "^8.11.0" - -acorn@^8.1.0, acorn@^8.11.0, acorn@^8.15.0, acorn@^8.8.1: - version "8.15.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" - integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - dependencies: - ajv "^8.0.0" - -ajv-keywords@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" - integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== - dependencies: - fast-deep-equal "^3.1.3" - -ajv@^8.0.0, ajv@^8.9.0: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" - integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== - dependencies: - fast-deep-equal "^3.1.3" - fast-uri "^3.0.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -anymatch@^3.0.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -babel-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" - integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== - dependencies: - "@jest/transform" "^29.7.0" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.6.3" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" - integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - -babel-preset-current-node-syntax@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz#20730d6cdc7dda5d89401cab10ac6a32067acde6" - integrity sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-import-attributes" "^7.24.7" - "@babel/plugin-syntax-import-meta" "^7.10.4" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - -babel-preset-jest@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" - integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== - dependencies: - babel-plugin-jest-hoist "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -baseline-browser-mapping@^2.8.3: - version "2.8.6" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.6.tgz#c37dea4291ed8d01682f85661dbe87967028642e" - integrity sha512-wrH5NNqren/QMtKUEEJf7z86YjfqW/2uw3IL3/xpqZUC95SSVIFXYQeeGjL6FT/X68IROu6RMehZQS5foy2BXw== - -brace-expansion@^1.1.7: - version "1.1.12" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" - integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - -browserslist@^4.24.0: - version "4.26.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.26.2.tgz#7db3b3577ec97f1140a52db4936654911078cef3" - integrity sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A== - dependencies: - baseline-browser-mapping "^2.8.3" - caniuse-lite "^1.0.30001741" - electron-to-chromium "^1.5.218" - node-releases "^2.0.21" - update-browserslist-db "^1.1.3" - -bs-logger@^0.2.6: - version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== - dependencies: - fast-json-stable-stringify "2.x" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" - integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001741: - version "1.0.30001743" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz#50ff91a991220a1ee2df5af00650dd5c308ea7cd" - integrity sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw== - -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -chrome-trace-event@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" - integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== - -ci-info@^3.2.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" - integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== - -cjs-module-lexer@^1.0.0: - version "1.4.3" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz#0f79731eb8cfe1ec72acd4066efac9d61991b00d" - integrity sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q== - -cli-width@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" - integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" - integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -cookie@^0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" - integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== - -create-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" - integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-config "^29.7.0" - jest-util "^29.7.0" - prompts "^2.0.1" - -cross-spawn@^7.0.3: - version "7.0.6" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" - integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -cssom@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" - integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - -data-urls@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" - integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== - dependencies: - abab "^2.0.6" - whatwg-mimetype "^3.0.0" - whatwg-url "^11.0.0" - -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.4.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== - dependencies: - ms "^2.1.3" - -decimal.js@^10.4.2: - version "10.6.0" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.6.0.tgz#e649a43e3ab953a72192ff5983865e509f37ed9a" - integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg== - -dedent@^1.0.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.0.tgz#c1f9445335f0175a96587be245a282ff451446ca" - integrity sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - -domexception@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" - integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== - dependencies: - webidl-conversions "^7.0.0" - -dunder-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" - integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== - dependencies: - call-bind-apply-helpers "^1.0.1" - es-errors "^1.3.0" - gopd "^1.2.0" - -electron-to-chromium@^1.5.218: - version "1.5.221" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.221.tgz#bd98014b2a247701c4ebd713080448d539545d79" - integrity sha512-/1hFJ39wkW01ogqSyYoA4goOXOtMRy6B+yvA1u42nnsEGtHzIzmk93aPISumVQeblj47JUHLC9coCjUxb1EvtQ== - -emittery@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" - integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.3: - version "5.18.3" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz#9b5f4c5c076b8787c78fe540392ce76a88855b44" - integrity sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -entities@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/entities/-/entities-6.0.1.tgz#c28c34a43379ca7f61d074130b2f5f7020a30694" - integrity sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g== - -error-ex@^1.3.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" - integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== - dependencies: - is-arrayish "^0.2.1" - -es-define-property@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" - integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== - -es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - -es-module-lexer@^1.2.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz#9159601561880a85f2734560a9099b2c31e5372a" - integrity sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA== - -es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" - integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== - dependencies: - es-errors "^1.3.0" - -es-set-tostringtag@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" - integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== - dependencies: - es-errors "^1.3.0" - get-intrinsic "^1.2.6" - has-tostringtag "^1.0.2" - hasown "^2.0.2" - -escalade@^3.1.1, escalade@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" - integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escodegen@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" - integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionalDependencies: - source-map "~0.6.1" - -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -esprima@^4.0.0, esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -events@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^29.0.0, expect@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" - integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== - dependencies: - "@jest/expect-utils" "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - -fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-uri@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" - integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== - -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -form-data@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" - integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - es-set-tostringtag "^2.1.0" - hasown "^2.0.2" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.2.6: - version "1.3.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" - integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== - dependencies: - call-bind-apply-helpers "^1.0.2" - es-define-property "^1.0.1" - es-errors "^1.3.0" - es-object-atoms "^1.1.1" - function-bind "^1.1.2" - get-proto "^1.0.1" - gopd "^1.2.0" - has-symbols "^1.1.0" - hasown "^2.0.2" - math-intrinsics "^1.1.0" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" - integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== - dependencies: - dunder-proto "^1.0.1" - es-object-atoms "^1.0.0" - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -gopd@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" - integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== - -graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -graphql@^16.8.1: - version "16.11.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.11.0.tgz#96d17f66370678027fdf59b2d4c20b4efaa8a633" - integrity sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw== - -handlebars@^4.7.8: - version "4.7.8" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" - integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.2" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbols@^1.0.3, has-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" - integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== - -has-tostringtag@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" - integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== - dependencies: - has-symbols "^1.0.3" - -hasown@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -headers-polyfill@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-4.0.3.tgz#922a0155de30ecc1f785bcf04be77844ca95ad07" - integrity sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ== - -html-encoding-sniffer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" - integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== - dependencies: - whatwg-encoding "^2.0.0" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -http-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" - integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== - dependencies: - "@tootallnate/once" "2" - agent-base "6" - debug "4" - -https-proxy-agent@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -iconv-lite@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -import-local@^3.0.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" - integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-core-module@^2.16.0: - version "2.16.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" - integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== - dependencies: - hasown "^2.0.2" - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-node-process@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-node-process/-/is-node-process-1.2.0.tgz#ea02a1b90ddb3934a19aea414e88edef7e11d134" - integrity sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-instrument@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" - integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== - dependencies: - "@babel/core" "^7.23.9" - "@babel/parser" "^7.23.9" - "@istanbuljs/schema" "^0.1.3" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.2.0.tgz#cb4535162b5784aa623cee21a7252cf2c807ac93" - integrity sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jest-changed-files@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" - integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== - dependencies: - execa "^5.0.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - -jest-circus@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" - integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^1.0.0" - is-generator-fn "^2.0.0" - jest-each "^29.7.0" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - pretty-format "^29.7.0" - pure-rand "^6.0.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" - integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== - dependencies: - "@jest/core" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - chalk "^4.0.0" - create-jest "^29.7.0" - exit "^0.1.2" - import-local "^3.0.2" - jest-config "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - yargs "^17.3.1" - -jest-config@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" - integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.7.0" - "@jest/types" "^29.6.3" - babel-jest "^29.7.0" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.7.0" - jest-environment-node "^29.7.0" - jest-get-type "^29.6.3" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-runner "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" - integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.6.3" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-docblock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" - integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - jest-get-type "^29.6.3" - jest-util "^29.7.0" - pretty-format "^29.7.0" - -jest-environment-jsdom@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz#d206fa3551933c3fd519e5dfdb58a0f5139a837f" - integrity sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/jsdom" "^20.0.0" - "@types/node" "*" - jest-mock "^29.7.0" - jest-util "^29.7.0" - jsdom "^20.0.0" - -jest-environment-node@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" - integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -jest-get-type@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" - integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== - -jest-haste-map@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" - integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== - dependencies: - "@jest/types" "^29.6.3" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - jest-worker "^29.7.0" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" - integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== - dependencies: - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-matcher-utils@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" - integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== - dependencies: - chalk "^4.0.0" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-message-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" - integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.6.3" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" - integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-util "^29.7.0" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" - integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== - -jest-resolve-dependencies@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" - integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== - dependencies: - jest-regex-util "^29.6.3" - jest-snapshot "^29.7.0" - -jest-resolve@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" - integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-pnp-resolver "^1.2.2" - jest-util "^29.7.0" - jest-validate "^29.7.0" - resolve "^1.20.0" - resolve.exports "^2.0.0" - slash "^3.0.0" - -jest-runner@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" - integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== - dependencies: - "@jest/console" "^29.7.0" - "@jest/environment" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.7.0" - jest-environment-node "^29.7.0" - jest-haste-map "^29.7.0" - jest-leak-detector "^29.7.0" - jest-message-util "^29.7.0" - jest-resolve "^29.7.0" - jest-runtime "^29.7.0" - jest-util "^29.7.0" - jest-watcher "^29.7.0" - jest-worker "^29.7.0" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" - integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/globals" "^29.7.0" - "@jest/source-map" "^29.6.3" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" - integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.7.0" - graceful-fs "^4.2.9" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - natural-compare "^1.4.0" - pretty-format "^29.7.0" - semver "^7.5.3" - -jest-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" - integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" - integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== - dependencies: - "@jest/types" "^29.6.3" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.6.3" - leven "^3.1.0" - pretty-format "^29.7.0" - -jest-watcher@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" - integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== - dependencies: - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.13.1" - jest-util "^29.7.0" - string-length "^4.0.1" - -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest-worker@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" - integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== - dependencies: - "@types/node" "*" - jest-util "^29.7.0" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" - integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== - dependencies: - "@jest/core" "^29.7.0" - "@jest/types" "^29.6.3" - import-local "^3.0.2" - jest-cli "^29.7.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsdom@^20.0.0: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" - integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== - dependencies: - abab "^2.0.6" - acorn "^8.8.1" - acorn-globals "^7.0.0" - cssom "^0.5.0" - cssstyle "^2.3.0" - data-urls "^3.0.2" - decimal.js "^10.4.2" - domexception "^4.0.0" - escodegen "^2.0.0" - form-data "^4.0.0" - html-encoding-sniffer "^3.0.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.1" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.2" - parse5 "^7.1.1" - saxes "^6.0.0" - symbol-tree "^3.2.4" - tough-cookie "^4.1.2" - w3c-xmlserializer "^4.0.0" - webidl-conversions "^7.0.0" - whatwg-encoding "^2.0.0" - whatwg-mimetype "^3.0.0" - whatwg-url "^11.0.0" - ws "^8.11.0" - xml-name-validator "^4.0.0" - -jsesc@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" - integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== - -json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - -make-error@^1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -math-intrinsics@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" - integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -micromatch@^4.0.0, micromatch@^4.0.4: - version "4.0.8" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" - integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== - dependencies: - braces "^3.0.3" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@^2.1.27: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.5: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -ms@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -msw@^2.8.4: - version "2.11.2" - resolved "https://registry.yarnpkg.com/msw/-/msw-2.11.2.tgz#622d83855f456a5f93b1528f6eb6f4c0114623c3" - integrity sha512-MI54hLCsrMwiflkcqlgYYNJJddY5/+S0SnONvhv1owOplvqohKSQyGejpNdUGyCwgs4IH7PqaNbPw/sKOEze9Q== - dependencies: - "@bundled-es-modules/cookie" "^2.0.1" - "@bundled-es-modules/statuses" "^1.0.1" - "@inquirer/confirm" "^5.0.0" - "@mswjs/interceptors" "^0.39.1" - "@open-draft/deferred-promise" "^2.2.0" - "@open-draft/until" "^2.1.0" - "@types/cookie" "^0.6.0" - "@types/statuses" "^2.0.4" - graphql "^16.8.1" - headers-polyfill "^4.0.2" - is-node-process "^1.2.0" - outvariant "^1.4.3" - path-to-regexp "^6.3.0" - picocolors "^1.1.1" - rettime "^0.7.0" - strict-event-emitter "^0.5.1" - tough-cookie "^6.0.0" - type-fest "^4.26.1" - yargs "^17.7.2" - -mute-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-2.0.0.tgz#a5446fc0c512b71c83c44d908d5c7b7b4c493b2b" - integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-releases@^2.0.21: - version "2.0.21" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.21.tgz#f59b018bc0048044be2d4c4c04e4c8b18160894c" - integrity sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw== - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -nwsapi@^2.2.2: - version "2.2.22" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.22.tgz#109f9530cda6c156d6a713cdf5939e9f0de98b9d" - integrity sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -outvariant@^1.4.0, outvariant@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.3.tgz#221c1bfc093e8fec7075497e7799fdbf43d14873" - integrity sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA== - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse5@^7.0.0, parse5@^7.1.1: - version "7.3.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.3.0.tgz#d7e224fa72399c7a175099f45fc2ad024b05ec05" - integrity sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw== - dependencies: - entities "^6.0.0" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4" - integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ== - -picocolors@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" - integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== - -picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pirates@^4.0.4: - version "4.0.7" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" - integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -prettier@^3.4.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" - integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== - -pretty-format@^29.0.0, pretty-format@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" - integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== - dependencies: - "@jest/schemas" "^29.6.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -psl@^1.1.33: - version "1.15.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.15.0.tgz#bdace31896f1d97cec6a79e8224898ce93d974c6" - integrity sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w== - dependencies: - punycode "^2.3.1" - -punycode@^2.1.1, punycode@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -pure-rand@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" - integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -react-is@^18.0.0: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" - integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f" - integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== - -resolve@^1.20.0: - version "1.22.10" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" - integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== - dependencies: - is-core-module "^2.16.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -rettime@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rettime/-/rettime-0.7.0.tgz#c040f1a65e396eaa4b8346dd96ed937edc79d96f" - integrity sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw== - -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -saxes@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" - integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== - dependencies: - xmlchars "^2.2.0" - -schema-utils@^4.3.0, schema-utils@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.2.tgz#0c10878bf4a73fd2b1dfd14b9462b26788c806ae" - integrity sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.9.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.1.0" - -semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.7.2: - version "7.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" - integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== - -serialize-javascript@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" - integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== - dependencies: - randombytes "^2.1.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -signal-exit@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" - integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.4: - version "0.7.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.6.tgz#a3658ab87e5b6429c8a1f3ba0083d4c61ca3ef02" - integrity sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" - -statuses@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" - integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== - -strict-event-emitter@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93" - integrity sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ== - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - -tapable@^2.1.1, tapable@^2.2.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.3.tgz#4b67b635b2d97578a06a2713d2f04800c237e99b" - integrity sha512-ZL6DDuAlRlLGghwcfmSn9sK3Hr6ArtyudlSAiCqQ6IfE+b+HHbydbYDIG15IfS5do+7XQQBdBiubF/cV2dnDzg== - -terser-webpack-plugin@^5.3.11: - version "5.3.14" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz#9031d48e57ab27567f02ace85c7d690db66c3e06" - integrity sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.25" - jest-worker "^27.4.5" - schema-utils "^4.3.0" - serialize-javascript "^6.0.2" - terser "^5.31.1" - -terser@^5.31.1: - version "5.44.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.0.tgz#ebefb8e5b8579d93111bfdfc39d2cf63879f4a82" - integrity sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.15.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -tldts-core@^7.0.14: - version "7.0.14" - resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.14.tgz#eb49edf8a39a37a2372ffc22f82d6ac725ace6cd" - integrity sha512-viZGNK6+NdluOJWwTO9olaugx0bkKhscIdriQQ+lNNhwitIKvb+SvhbYgnCz6j9p7dX3cJntt4agQAKMXLjJ5g== - -tldts@^7.0.5: - version "7.0.14" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.14.tgz#5dc352e087c12978b7d1d36d8a346496e04dca72" - integrity sha512-lMNHE4aSI3LlkMUMicTmAG3tkkitjOQGDTFboPJwAg2kJXKP1ryWEyqujktg5qhrFZOkk5YFzgkxg3jErE+i5w== - dependencies: - tldts-core "^7.0.14" - -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -tough-cookie@^4.1.2: - version "4.1.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" - integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.2.0" - url-parse "^1.5.3" - -tough-cookie@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.0.tgz#11e418b7864a2c0d874702bc8ce0f011261940e5" - integrity sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w== - dependencies: - tldts "^7.0.5" - -tr46@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" - integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== - dependencies: - punycode "^2.1.1" - -ts-jest@^29.3.4: - version "29.4.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.3.tgz#23264489bebb5b3e2c7966dbf6788e960f244f7c" - integrity sha512-KTWbK2Wot8VXargsLoxhSoEQ9OyMdzQXQoUDeIulWu2Tf7gghuBHeg+agZqVLdTOHhQHVKAaeuctBDRkhWE7hg== - dependencies: - bs-logger "^0.2.6" - fast-json-stable-stringify "^2.1.0" - handlebars "^4.7.8" - json5 "^2.2.3" - lodash.memoize "^4.1.2" - make-error "^1.3.6" - semver "^7.7.2" - type-fest "^4.41.0" - yargs-parser "^21.1.1" - -ts-loader@^9.5.1: - version "9.5.4" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.4.tgz#44b571165c10fb5a90744aa5b7e119233c4f4585" - integrity sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - source-map "^0.7.4" - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^4.26.1, type-fest@^4.41.0: - version "4.41.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58" - integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== - -typescript@~5.7.2: - version "5.7.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" - integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== - -uglify-js@^3.1.4: - version "3.19.3" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" - integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ== - -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - -undici-types@~7.12.0: - version "7.12.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.12.0.tgz#15c5c7475c2a3ba30659529f5cdb4674b622fafb" - integrity sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ== - -universalify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" - integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== - -update-browserslist-db@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420" - integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== - dependencies: - escalade "^3.2.0" - picocolors "^1.1.1" - -url-parse@^1.5.3: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -v8-to-istanbul@^9.0.1: - version "9.3.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" - integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^2.0.0" - -w3c-xmlserializer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" - integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== - dependencies: - xml-name-validator "^4.0.0" - -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -watchpack@^2.4.1: - version "2.4.4" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.4.tgz#473bda72f0850453da6425081ea46fc0d7602947" - integrity sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -webidl-conversions@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" - integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== - -webpack-sources@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.3.3.tgz#d4bf7f9909675d7a070ff14d0ef2a4f3c982c723" - integrity sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg== - -webpack@^5.97.1: - version "5.101.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.101.3.tgz#3633b2375bb29ea4b06ffb1902734d977bc44346" - integrity sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A== - dependencies: - "@types/eslint-scope" "^3.7.7" - "@types/estree" "^1.0.8" - "@types/json-schema" "^7.0.15" - "@webassemblyjs/ast" "^1.14.1" - "@webassemblyjs/wasm-edit" "^1.14.1" - "@webassemblyjs/wasm-parser" "^1.14.1" - acorn "^8.15.0" - acorn-import-phases "^1.0.3" - browserslist "^4.24.0" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.3" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.11" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^4.3.2" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.11" - watchpack "^2.4.1" - webpack-sources "^3.3.3" - -whatwg-encoding@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" - integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== - dependencies: - iconv-lite "0.6.3" - -whatwg-mimetype@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" - integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== - -whatwg-url@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" - integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== - dependencies: - tr46 "^3.0.0" - webidl-conversions "^7.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -ws@^8.11.0: - version "8.18.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472" - integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg== - -xml-name-validator@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" - integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== - -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.3.1, yargs@^17.7.2: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -yoctocolors-cjs@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz#7e4964ea8ec422b7a40ac917d3a344cfd2304baa" - integrity sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==