retell-sdk 4.65.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -1326
- package/LICENSE +1 -1
- package/README.md +120 -44
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +217 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +217 -0
- package/client.d.ts.map +1 -0
- package/client.js +513 -0
- package/client.js.map +1 -0
- package/client.mjs +509 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +6 -151
- package/index.d.mts.map +1 -0
- package/index.d.ts +5 -150
- package/index.d.ts.map +1 -1
- package/index.js +12 -150
- package/index.js.map +1 -1
- package/index.mjs +5 -123
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +101 -65
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/agent.d.mts +1803 -0
- package/resources/agent.d.mts.map +1 -0
- package/resources/agent.d.ts +377 -81
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +33 -20
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +33 -20
- package/resources/agent.mjs.map +1 -1
- package/resources/batch-call.d.mts +926 -0
- package/resources/batch-call.d.mts.map +1 -0
- package/resources/batch-call.d.ts +220 -28
- package/resources/batch-call.d.ts.map +1 -1
- package/resources/batch-call.js +6 -2
- package/resources/batch-call.js.map +1 -1
- package/resources/batch-call.mjs +6 -2
- package/resources/batch-call.mjs.map +1 -1
- package/resources/call.d.mts +4280 -0
- package/resources/call.d.mts.map +1 -0
- package/resources/call.d.ts +556 -110
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +20 -10
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +20 -10
- package/resources/call.mjs.map +1 -1
- package/resources/chat-agent.d.mts +836 -0
- package/resources/chat-agent.d.mts.map +1 -0
- package/resources/chat-agent.d.ts +118 -23
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat-agent.js +33 -20
- package/resources/chat-agent.js.map +1 -1
- package/resources/chat-agent.mjs +33 -20
- package/resources/chat-agent.mjs.map +1 -1
- package/resources/chat.d.mts +607 -0
- package/resources/chat.d.mts.map +1 -0
- package/resources/chat.d.ts +82 -30
- package/resources/chat.d.ts.map +1 -1
- package/resources/chat.js +21 -11
- package/resources/chat.js.map +1 -1
- package/resources/chat.mjs +21 -11
- package/resources/chat.mjs.map +1 -1
- package/resources/concurrency.d.mts +51 -0
- package/resources/concurrency.d.mts.map +1 -0
- package/resources/concurrency.d.ts +14 -3
- package/resources/concurrency.d.ts.map +1 -1
- package/resources/concurrency.js +1 -1
- package/resources/concurrency.js.map +1 -1
- package/resources/concurrency.mjs +1 -1
- package/resources/concurrency.mjs.map +1 -1
- package/resources/conversation-flow-component.d.mts +11838 -0
- package/resources/conversation-flow-component.d.mts.map +1 -0
- package/resources/conversation-flow-component.d.ts +6600 -2597
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow-component.js +10 -8
- package/resources/conversation-flow-component.js.map +1 -1
- package/resources/conversation-flow-component.mjs +10 -8
- package/resources/conversation-flow-component.mjs.map +1 -1
- package/resources/conversation-flow.d.mts +23851 -0
- package/resources/conversation-flow.d.mts.map +1 -0
- package/resources/conversation-flow.d.ts +15877 -7958
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/conversation-flow.js +30 -15
- package/resources/conversation-flow.js.map +1 -1
- package/resources/conversation-flow.mjs +30 -15
- package/resources/conversation-flow.mjs.map +1 -1
- package/resources/index.d.mts +15 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/knowledge-base.d.mts +228 -0
- package/resources/knowledge-base.d.mts.map +1 -0
- package/resources/knowledge-base.d.ts +23 -14
- package/resources/knowledge-base.d.ts.map +1 -1
- package/resources/knowledge-base.js +16 -36
- package/resources/knowledge-base.js.map +1 -1
- package/resources/knowledge-base.mjs +16 -13
- package/resources/knowledge-base.mjs.map +1 -1
- package/resources/llm.d.mts +5306 -0
- package/resources/llm.d.mts.map +1 -0
- package/resources/llm.d.ts +1189 -477
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +28 -15
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +28 -15
- package/resources/llm.mjs.map +1 -1
- package/resources/mcp-tool.d.mts +45 -0
- package/resources/mcp-tool.d.mts.map +1 -0
- package/resources/mcp-tool.d.ts +8 -3
- package/resources/mcp-tool.d.ts.map +1 -1
- package/resources/mcp-tool.js +4 -3
- package/resources/mcp-tool.js.map +1 -1
- package/resources/mcp-tool.mjs +4 -3
- package/resources/mcp-tool.mjs.map +1 -1
- package/resources/phone-number.d.mts +595 -0
- package/resources/phone-number.d.mts.map +1 -0
- package/resources/phone-number.d.ts +332 -13
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/phone-number.js +7 -5
- package/resources/phone-number.js.map +1 -1
- package/resources/phone-number.mjs +7 -5
- package/resources/phone-number.mjs.map +1 -1
- package/resources/tests.d.mts +561 -0
- package/resources/tests.d.mts.map +1 -0
- package/resources/tests.d.ts +437 -7
- package/resources/tests.d.ts.map +1 -1
- package/resources/tests.js +60 -1
- package/resources/tests.js.map +1 -1
- package/resources/tests.mjs +60 -1
- package/resources/tests.mjs.map +1 -1
- package/resources/voice.d.mts +130 -0
- package/resources/voice.d.mts.map +1 -0
- package/resources/voice.d.ts +89 -6
- package/resources/voice.d.ts.map +1 -1
- package/resources/voice.js +23 -3
- package/resources/voice.js.map +1 -1
- package/resources/voice.mjs +23 -3
- package/resources/voice.mjs.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1005 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +5 -405
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/resource.ts +2 -11
- package/src/resources/agent.ts +610 -101
- package/src/resources/batch-call.ts +318 -26
- package/src/resources/call.ts +835 -111
- package/src/resources/chat-agent.ts +191 -41
- package/src/resources/chat.ts +108 -40
- package/src/resources/concurrency.ts +16 -3
- package/src/resources/conversation-flow-component.ts +9469 -4285
- package/src/resources/conversation-flow.ts +21572 -11318
- package/src/resources/index.ts +25 -2
- package/src/resources/knowledge-base.ts +40 -28
- package/src/resources/llm.ts +1422 -599
- package/src/resources/mcp-tool.ts +13 -6
- package/src/resources/phone-number.ts +410 -18
- package/src/resources/tests.ts +608 -9
- package/src/resources/voice.ts +122 -7
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -259
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -175
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -164
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/lib/webhook_auth.d.ts +0 -27
- package/lib/webhook_auth.d.ts.map +0 -1
- package/lib/webhook_auth.js +0 -50
- package/lib/webhook_auth.js.map +0 -1
- package/lib/webhook_auth.mjs +0 -45
- package/lib/webhook_auth.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/lib/webhook_auth.ts +0 -69
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -0,0 +1,1803 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Agent extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new agent
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const agentResponse = await client.agent.create({
|
|
11
|
+
* response_engine: {
|
|
12
|
+
* llm_id: 'llm_234sdertfsdsfsdf',
|
|
13
|
+
* type: 'retell-llm',
|
|
14
|
+
* },
|
|
15
|
+
* voice_id: '11labs-Adrian',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieve details of a specific agent
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const agentResponse = await client.agent.retrieve(
|
|
26
|
+
* '16b980523634a6dc504898cda492e939',
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
retrieve(agentID: string, query?: AgentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<AgentResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Update an existing agent's latest draft version
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const agentResponse = await client.agent.update(
|
|
37
|
+
* '16b980523634a6dc504898cda492e939',
|
|
38
|
+
* { agent_name: 'Jarvis' },
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<AgentResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* List all agents
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const agentResponses = await client.agent.list();
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
list(query?: AgentListParams | null | undefined, options?: RequestOptions): APIPromise<AgentListResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Delete an existing agent
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* await client.agent.delete(
|
|
58
|
+
* 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
delete(agentID: string, options?: RequestOptions): APIPromise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Get all versions of an agent
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const agentResponses = await client.agent.getVersions(
|
|
69
|
+
* '16b980523634a6dc504898cda492e939',
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
getVersions(agentID: string, options?: RequestOptions): APIPromise<AgentGetVersionsResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* Publish the latest version of the agent and create a new draft agent with newer
|
|
76
|
+
* version.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* await client.agent.publish(
|
|
81
|
+
* '16b980523634a6dc504898cda492e939',
|
|
82
|
+
* );
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
publish(agentID: string, options?: RequestOptions): APIPromise<void>;
|
|
86
|
+
}
|
|
87
|
+
export interface AgentResponse {
|
|
88
|
+
/**
|
|
89
|
+
* Unique id of agent.
|
|
90
|
+
*/
|
|
91
|
+
agent_id: string;
|
|
92
|
+
/**
|
|
93
|
+
* Last modification timestamp (milliseconds since epoch). Either the time of last
|
|
94
|
+
* update or creation if no updates available.
|
|
95
|
+
*/
|
|
96
|
+
last_modification_timestamp: number;
|
|
97
|
+
/**
|
|
98
|
+
* The Response Engine to attach to the agent. It is used to generate responses for
|
|
99
|
+
* the agent. You need to create a Response Engine first before attaching it to an
|
|
100
|
+
* agent.
|
|
101
|
+
*/
|
|
102
|
+
response_engine: AgentResponse.ResponseEngineRetellLm | AgentResponse.ResponseEngineCustomLm | AgentResponse.ResponseEngineConversationFlow;
|
|
103
|
+
/**
|
|
104
|
+
* Version of the agent.
|
|
105
|
+
*/
|
|
106
|
+
version: number;
|
|
107
|
+
/**
|
|
108
|
+
* Unique voice id used for the agent. Find list of available voices and their
|
|
109
|
+
* preview in Dashboard.
|
|
110
|
+
*/
|
|
111
|
+
voice_id: string;
|
|
112
|
+
/**
|
|
113
|
+
* The name of the agent. Only used for your own reference.
|
|
114
|
+
*/
|
|
115
|
+
agent_name?: string | null;
|
|
116
|
+
/**
|
|
117
|
+
* If set to true, DTMF input will be accepted and processed. If false, any DTMF
|
|
118
|
+
* input will be ignored. Default to true.
|
|
119
|
+
*/
|
|
120
|
+
allow_user_dtmf?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* If set, will add ambient environment sound to the call to make experience more
|
|
123
|
+
* realistic. Currently supports the following options:
|
|
124
|
+
*
|
|
125
|
+
* - `coffee-shop`: Coffee shop ambience with people chatting in background.
|
|
126
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
|
|
127
|
+
* - `convention-hall`: Convention hall ambience, with some echo and people
|
|
128
|
+
* chatting in background.
|
|
129
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
|
|
130
|
+
* - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
|
|
131
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
|
|
132
|
+
* - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
|
|
133
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
|
|
134
|
+
* - `static-noise`: Constant static noise.
|
|
135
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
|
|
136
|
+
* - `call-center`: Call center work noise.
|
|
137
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
|
|
138
|
+
* Set to `null` to remove ambient sound from this agent.
|
|
139
|
+
*/
|
|
140
|
+
ambient_sound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'static-noise' | 'call-center' | null;
|
|
141
|
+
/**
|
|
142
|
+
* If set, will control the volume of the ambient sound. Value ranging from [0,2].
|
|
143
|
+
* Lower value means quieter ambient sound, while higher value means louder ambient
|
|
144
|
+
* sound. If unset, default value 1 will apply.
|
|
145
|
+
*/
|
|
146
|
+
ambient_sound_volume?: number;
|
|
147
|
+
/**
|
|
148
|
+
* Prompt to determine whether the post call or chat analysis should mark the
|
|
149
|
+
* interaction as successful. Set to null to use the default prompt.
|
|
150
|
+
*/
|
|
151
|
+
analysis_successful_prompt?: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* Prompt to guide how the post call or chat analysis summary should be generated.
|
|
154
|
+
* When unset, the default system prompt is used. Set to null to use the default
|
|
155
|
+
* prompt.
|
|
156
|
+
*/
|
|
157
|
+
analysis_summary_prompt?: string | null;
|
|
158
|
+
/**
|
|
159
|
+
* Only applicable when enable_backchannel is true. Controls how often the agent
|
|
160
|
+
* would backchannel when a backchannel is possible. Value ranging from [0,1].
|
|
161
|
+
* Lower value means less frequent backchannel, while higher value means more
|
|
162
|
+
* frequent backchannel. If unset, default value 0.8 will apply.
|
|
163
|
+
*/
|
|
164
|
+
backchannel_frequency?: number;
|
|
165
|
+
/**
|
|
166
|
+
* Only applicable when enable_backchannel is true. A list of words that the agent
|
|
167
|
+
* would use as backchannel. If not set, default backchannel words will apply.
|
|
168
|
+
* Check out
|
|
169
|
+
* [backchannel default words](/agent/interaction-configuration#backchannel) for
|
|
170
|
+
* more details. Note that certain voices do not work too well with certain words,
|
|
171
|
+
* so it's recommended to experiment before adding any words.
|
|
172
|
+
*/
|
|
173
|
+
backchannel_words?: Array<string> | null;
|
|
174
|
+
/**
|
|
175
|
+
* If set, will delay the first message by the specified amount of milliseconds, so
|
|
176
|
+
* that it gives user more time to prepare to take the call. Valid range is [0,
|
|
177
|
+
* 5000]. If not set or set to 0, agent will speak immediately. Only applicable
|
|
178
|
+
* when agent speaks first.
|
|
179
|
+
*/
|
|
180
|
+
begin_message_delay_ms?: number;
|
|
181
|
+
/**
|
|
182
|
+
* Provide a customized list of keywords to bias the transcriber model, so that
|
|
183
|
+
* these words are more likely to get transcribed. Commonly used for names, brands,
|
|
184
|
+
* street, etc.
|
|
185
|
+
*/
|
|
186
|
+
boosted_keywords?: Array<string> | null;
|
|
187
|
+
/**
|
|
188
|
+
* Custom STT configuration. Only used when stt_mode is set to custom.
|
|
189
|
+
*/
|
|
190
|
+
custom_stt_config?: AgentResponse.CustomSttConfig;
|
|
191
|
+
/**
|
|
192
|
+
* Granular setting to manage how Retell stores sensitive data (transcripts,
|
|
193
|
+
* recordings, logs, etc.). This replaces the deprecated
|
|
194
|
+
* `opt_out_sensitive_data_storage` field.
|
|
195
|
+
*
|
|
196
|
+
* - `everything`: Store all data including transcripts, recordings, and logs.
|
|
197
|
+
* - `everything_except_pii`: Store data without PII when PII is detected.
|
|
198
|
+
* - `basic_attributes_only`: Store only basic attributes; no
|
|
199
|
+
* transcripts/recordings/logs. If not set, default value of "everything" will
|
|
200
|
+
* apply.
|
|
201
|
+
*/
|
|
202
|
+
data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
|
|
203
|
+
/**
|
|
204
|
+
* If set, determines what denoising mode to use. Use "no-denoise" to bypass all
|
|
205
|
+
* audio denoising. Default to noise-cancellation.
|
|
206
|
+
*/
|
|
207
|
+
denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
|
|
208
|
+
/**
|
|
209
|
+
* Controls whether the agent would backchannel (agent interjects the speaker with
|
|
210
|
+
* phrases like "yeah", "uh-huh" to signify interest and engagement). Backchannel
|
|
211
|
+
* when enabled tends to show up more in longer user utterances. If not set, agent
|
|
212
|
+
* will not backchannel.
|
|
213
|
+
*/
|
|
214
|
+
enable_backchannel?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* If set to true, will enable dynamic voice speed adjustment based on the user's
|
|
217
|
+
* speech rate and conversation context. If unset, default value false will apply.
|
|
218
|
+
*/
|
|
219
|
+
enable_dynamic_voice_speed?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* If set to true, will detect whether the call enters a voicemail. Note that this
|
|
222
|
+
* feature is only available for phone calls.
|
|
223
|
+
*/
|
|
224
|
+
enable_voicemail_detection?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* If users stay silent for a period after agent speech, end the call. The minimum
|
|
227
|
+
* value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
|
|
228
|
+
*/
|
|
229
|
+
end_call_after_silence_ms?: number;
|
|
230
|
+
/**
|
|
231
|
+
* When TTS provider for the selected voice is experiencing outages, we would use
|
|
232
|
+
* fallback voices listed here for the agent. Voice id and the fallback voice ids
|
|
233
|
+
* must be from different TTS providers. The system would go through the list in
|
|
234
|
+
* order, if the first one in the list is also having outage, it would use the next
|
|
235
|
+
* one. Set to null to remove voice fallback for the agent.
|
|
236
|
+
*/
|
|
237
|
+
fallback_voice_ids?: Array<string> | null;
|
|
238
|
+
/**
|
|
239
|
+
* Configuration for guardrail checks to detect and prevent prohibited topics in
|
|
240
|
+
* agent output and user input.
|
|
241
|
+
*/
|
|
242
|
+
guardrail_config?: AgentResponse.GuardrailConfig;
|
|
243
|
+
/**
|
|
244
|
+
* Controls how sensitive the agent is to user interruptions. Value ranging from
|
|
245
|
+
* [0,1]. Lower value means it will take longer / more words for user to interrupt
|
|
246
|
+
* agent, while higher value means it's easier for user to interrupt agent. If
|
|
247
|
+
* unset, default value 1 will apply. When this is set to 0, agent would never be
|
|
248
|
+
* interrupted.
|
|
249
|
+
*/
|
|
250
|
+
interruption_sensitivity?: number;
|
|
251
|
+
/**
|
|
252
|
+
* Whether the agent is public. When set to true, the agent is available for public
|
|
253
|
+
* agent preview link.
|
|
254
|
+
*/
|
|
255
|
+
is_public?: boolean | null;
|
|
256
|
+
/**
|
|
257
|
+
* Whether the agent is published.
|
|
258
|
+
*/
|
|
259
|
+
is_published?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* If this option is set, the call will try to detect IVR in the first 3 minutes of
|
|
262
|
+
* the call. Actions defined will be applied when the IVR is detected. Set this to
|
|
263
|
+
* null to disable IVR detection.
|
|
264
|
+
*/
|
|
265
|
+
ivr_option?: AgentResponse.IvrOption | null;
|
|
266
|
+
/**
|
|
267
|
+
* Specifies what language (and dialect) the speech recognition will operate in.
|
|
268
|
+
* For instance, selecting `en-GB` optimizes speech recognition for British
|
|
269
|
+
* English. If unset, will use default value `en-US`. Select `multi` for
|
|
270
|
+
* multilingual support.
|
|
271
|
+
*/
|
|
272
|
+
language?: 'en-US' | 'en-IN' | 'en-GB' | 'en-AU' | 'en-NZ' | 'de-DE' | 'es-ES' | 'es-419' | 'hi-IN' | 'fr-FR' | 'fr-CA' | 'ja-JP' | 'pt-PT' | 'pt-BR' | 'zh-CN' | 'ru-RU' | 'it-IT' | 'ko-KR' | 'nl-NL' | 'nl-BE' | 'pl-PL' | 'tr-TR' | 'vi-VN' | 'ro-RO' | 'bg-BG' | 'ca-ES' | 'th-TH' | 'da-DK' | 'fi-FI' | 'el-GR' | 'hu-HU' | 'id-ID' | 'no-NO' | 'sk-SK' | 'sv-SE' | 'lt-LT' | 'lv-LV' | 'cs-CZ' | 'ms-MY' | 'af-ZA' | 'ar-SA' | 'az-AZ' | 'bs-BA' | 'cy-GB' | 'fa-IR' | 'fil-PH' | 'gl-ES' | 'he-IL' | 'hr-HR' | 'hy-AM' | 'is-IS' | 'kk-KZ' | 'kn-IN' | 'mk-MK' | 'mr-IN' | 'ne-NP' | 'sl-SI' | 'sr-RS' | 'sw-KE' | 'ta-IN' | 'ur-IN' | 'yue-CN' | 'uk-UA' | 'multi';
|
|
273
|
+
/**
|
|
274
|
+
* Maximum allowed length for the call, will force end the call if reached. The
|
|
275
|
+
* minimum value allowed is 60,000 ms (1 min), and maximum value allowed is
|
|
276
|
+
* 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).
|
|
277
|
+
*/
|
|
278
|
+
max_call_duration_ms?: number;
|
|
279
|
+
/**
|
|
280
|
+
* If set to true, will normalize the some part of text (number, currency, date,
|
|
281
|
+
* etc) to spoken to its spoken form for more consistent speech synthesis
|
|
282
|
+
* (sometimes the voice synthesize system itself might read these wrong with the
|
|
283
|
+
* raw text). For example, it will convert "Call my number 2137112342 on Jul 5th,
|
|
284
|
+
* 2024 for the $24.12 payment" to "Call my number two one three seven one one two
|
|
285
|
+
* three four two on july fifth, twenty twenty four for the twenty four dollars
|
|
286
|
+
* twelve cents payment" before starting audio generation.
|
|
287
|
+
*/
|
|
288
|
+
normalize_for_speech?: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Whether this agent opts in for signed URLs for public logs and recordings. When
|
|
291
|
+
* enabled, the generated URLs will include security signatures that restrict
|
|
292
|
+
* access and automatically expire after 24 hours.
|
|
293
|
+
*/
|
|
294
|
+
opt_in_signed_url?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Configuration for PII scrubbing from transcripts and recordings.
|
|
297
|
+
*/
|
|
298
|
+
pii_config?: AgentResponse.PiiConfig;
|
|
299
|
+
/**
|
|
300
|
+
* Post call analysis data to extract from the call. This data will augment the
|
|
301
|
+
* pre-defined variables extracted in the call analysis. This will be available
|
|
302
|
+
* after the call ends.
|
|
303
|
+
*/
|
|
304
|
+
post_call_analysis_data?: Array<AgentResponse.StringAnalysisData | AgentResponse.EnumAnalysisData | AgentResponse.BooleanAnalysisData | AgentResponse.NumberAnalysisData> | null;
|
|
305
|
+
/**
|
|
306
|
+
* The model to use for post call analysis. Default to gpt-4.1-mini.
|
|
307
|
+
*/
|
|
308
|
+
post_call_analysis_model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
309
|
+
/**
|
|
310
|
+
* A list of words / phrases and their pronunciation to be used to guide the audio
|
|
311
|
+
* synthesize for consistent pronunciation. Currently only supported for English &
|
|
312
|
+
* 11labs voices. Set to null to remove pronunciation dictionary from this agent.
|
|
313
|
+
*/
|
|
314
|
+
pronunciation_dictionary?: Array<AgentResponse.PronunciationDictionary> | null;
|
|
315
|
+
/**
|
|
316
|
+
* If set, controls how many times agent would remind user when user is
|
|
317
|
+
* unresponsive. Must be a non negative integer. If unset, default value of 1 will
|
|
318
|
+
* apply (remind once). Set to 0 to disable agent from reminding.
|
|
319
|
+
*/
|
|
320
|
+
reminder_max_count?: number;
|
|
321
|
+
/**
|
|
322
|
+
* If set (in milliseconds), will trigger a reminder to the agent to speak if the
|
|
323
|
+
* user has been silent for the specified duration after some agent speech. Must be
|
|
324
|
+
* a positive number. If unset, default value of 10000 ms (10 s) will apply.
|
|
325
|
+
*/
|
|
326
|
+
reminder_trigger_ms?: number;
|
|
327
|
+
/**
|
|
328
|
+
* Controls how responsive is the agent. Value ranging from [0,1]. Lower value
|
|
329
|
+
* means less responsive agent (wait more, respond slower), while higher value
|
|
330
|
+
* means faster exchanges (respond when it can). If unset, default value 1 will
|
|
331
|
+
* apply.
|
|
332
|
+
*/
|
|
333
|
+
responsiveness?: number;
|
|
334
|
+
/**
|
|
335
|
+
* If set, the phone ringing will last for the specified amount of milliseconds.
|
|
336
|
+
* This applies for both outbound call ringtime, and call transfer ringtime.
|
|
337
|
+
* Default to 30000 (30 s). Valid range is [5000, 90000].
|
|
338
|
+
*/
|
|
339
|
+
ring_duration_ms?: number;
|
|
340
|
+
/**
|
|
341
|
+
* The expiration time for the signed url in milliseconds. Only applicable when
|
|
342
|
+
* opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will
|
|
343
|
+
* apply.
|
|
344
|
+
*/
|
|
345
|
+
signed_url_expiration_ms?: number | null;
|
|
346
|
+
/**
|
|
347
|
+
* If set, determines whether speech to text should focus on latency or accuracy.
|
|
348
|
+
* Default to fast mode. When set to custom, custom_stt_config must be provided.
|
|
349
|
+
*/
|
|
350
|
+
stt_mode?: 'fast' | 'accurate' | 'custom';
|
|
351
|
+
user_dtmf_options?: AgentResponse.UserDtmfOptions | null;
|
|
352
|
+
/**
|
|
353
|
+
* Optional description of the agent version. Used for your own reference and
|
|
354
|
+
* documentation.
|
|
355
|
+
*/
|
|
356
|
+
version_description?: string | null;
|
|
357
|
+
/**
|
|
358
|
+
* If set, determines the vocabulary set to use for transcription. This setting
|
|
359
|
+
* only applies for English agents, for non English agent, this setting is a no-op.
|
|
360
|
+
* Default to general.
|
|
361
|
+
*/
|
|
362
|
+
vocab_specialization?: 'general' | 'medical';
|
|
363
|
+
/**
|
|
364
|
+
* Controls the emotional tone of the agent's voice. Currently supported for
|
|
365
|
+
* Cartesia and Minimax TTS providers. If unset, no emotion will be used.
|
|
366
|
+
*/
|
|
367
|
+
voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised' | null;
|
|
368
|
+
/**
|
|
369
|
+
* Select the voice model used for the selected voice. Each provider has a set of
|
|
370
|
+
* available voice models. Set to null to remove voice model selection, and default
|
|
371
|
+
* ones will apply. Check out dashboard for more details of each voice model.
|
|
372
|
+
*/
|
|
373
|
+
voice_model?: 'eleven_turbo_v2' | 'eleven_flash_v2' | 'eleven_turbo_v2_5' | 'eleven_flash_v2_5' | 'eleven_multilingual_v2' | 'sonic-2' | 'sonic-3' | 'sonic-3-latest' | 'sonic-turbo' | 'tts-1' | 'gpt-4o-mini-tts' | 'speech-02-turbo' | 'speech-2.8-turbo' | null;
|
|
374
|
+
/**
|
|
375
|
+
* Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower
|
|
376
|
+
* speech, while higher value means faster speech rate. If unset, default value 1
|
|
377
|
+
* will apply.
|
|
378
|
+
*/
|
|
379
|
+
voice_speed?: number;
|
|
380
|
+
/**
|
|
381
|
+
* Controls how stable the voice is. Value ranging from [0,2]. Lower value means
|
|
382
|
+
* more stable, and higher value means more variant speech generation. Currently
|
|
383
|
+
* this setting only applies to `11labs` voices. If unset, default value 1 will
|
|
384
|
+
* apply.
|
|
385
|
+
*/
|
|
386
|
+
voice_temperature?: number;
|
|
387
|
+
/**
|
|
388
|
+
* Configures when to stop running voicemail detection, as it becomes unlikely to
|
|
389
|
+
* hit voicemail after a couple minutes, and keep running it will only have
|
|
390
|
+
* negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value
|
|
391
|
+
* allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
|
|
392
|
+
*/
|
|
393
|
+
voicemail_detection_timeout_ms?: number;
|
|
394
|
+
/**
|
|
395
|
+
* The message to be played when the call enters a voicemail. Note that this
|
|
396
|
+
* feature is only available for phone calls. If you want to hangup after hitting
|
|
397
|
+
* voicemail, set this to empty string.
|
|
398
|
+
*/
|
|
399
|
+
voicemail_message?: string;
|
|
400
|
+
/**
|
|
401
|
+
* If this option is set, the call will try to detect voicemail in the first 3
|
|
402
|
+
* minutes of the call. Actions defined (hangup, or leave a message) will be
|
|
403
|
+
* applied when the voicemail is detected. Set this to null to disable voicemail
|
|
404
|
+
* detection.
|
|
405
|
+
*/
|
|
406
|
+
voicemail_option?: AgentResponse.VoicemailOption | null;
|
|
407
|
+
/**
|
|
408
|
+
* If set, will control the volume of the agent. Value ranging from [0,2]. Lower
|
|
409
|
+
* value means quieter agent speech, while higher value means louder agent speech.
|
|
410
|
+
* If unset, default value 1 will apply.
|
|
411
|
+
*/
|
|
412
|
+
volume?: number;
|
|
413
|
+
/**
|
|
414
|
+
* Which webhook events this agent should receive. If not set, defaults to
|
|
415
|
+
* call_started, call_ended, call_analyzed.
|
|
416
|
+
*/
|
|
417
|
+
webhook_events?: Array<'call_started' | 'call_ended' | 'call_analyzed' | 'transcript_updated' | 'transfer_started' | 'transfer_bridged' | 'transfer_cancelled' | 'transfer_ended'> | null;
|
|
418
|
+
/**
|
|
419
|
+
* The timeout for the webhook in milliseconds. If not set, default value of 10000
|
|
420
|
+
* will apply.
|
|
421
|
+
*/
|
|
422
|
+
webhook_timeout_ms?: number;
|
|
423
|
+
/**
|
|
424
|
+
* The webhook for agent to listen to call events. See what events it would get at
|
|
425
|
+
* [webhook doc](/features/webhook). If set, will binds webhook events for this
|
|
426
|
+
* agent to the specified url, and will ignore the account level webhook for this
|
|
427
|
+
* agent. Set to `null` to remove webhook url from this agent.
|
|
428
|
+
*/
|
|
429
|
+
webhook_url?: string | null;
|
|
430
|
+
}
|
|
431
|
+
export declare namespace AgentResponse {
|
|
432
|
+
interface ResponseEngineRetellLm {
|
|
433
|
+
/**
|
|
434
|
+
* id of the Retell LLM Response Engine.
|
|
435
|
+
*/
|
|
436
|
+
llm_id: string;
|
|
437
|
+
/**
|
|
438
|
+
* type of the Response Engine.
|
|
439
|
+
*/
|
|
440
|
+
type: 'retell-llm';
|
|
441
|
+
/**
|
|
442
|
+
* Version of the Retell LLM Response Engine.
|
|
443
|
+
*/
|
|
444
|
+
version?: number | null;
|
|
445
|
+
}
|
|
446
|
+
interface ResponseEngineCustomLm {
|
|
447
|
+
/**
|
|
448
|
+
* LLM websocket url of the custom LLM.
|
|
449
|
+
*/
|
|
450
|
+
llm_websocket_url: string;
|
|
451
|
+
/**
|
|
452
|
+
* type of the Response Engine.
|
|
453
|
+
*/
|
|
454
|
+
type: 'custom-llm';
|
|
455
|
+
}
|
|
456
|
+
interface ResponseEngineConversationFlow {
|
|
457
|
+
/**
|
|
458
|
+
* ID of the Conversation Flow Response Engine.
|
|
459
|
+
*/
|
|
460
|
+
conversation_flow_id: string;
|
|
461
|
+
/**
|
|
462
|
+
* type of the Response Engine.
|
|
463
|
+
*/
|
|
464
|
+
type: 'conversation-flow';
|
|
465
|
+
/**
|
|
466
|
+
* Version of the Conversation Flow Response Engine.
|
|
467
|
+
*/
|
|
468
|
+
version?: number | null;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Custom STT configuration. Only used when stt_mode is set to custom.
|
|
472
|
+
*/
|
|
473
|
+
interface CustomSttConfig {
|
|
474
|
+
/**
|
|
475
|
+
* Endpointing timeout in milliseconds. Minimum is 100 for azure, 10 for deepgram.
|
|
476
|
+
*/
|
|
477
|
+
endpointing_ms: number;
|
|
478
|
+
/**
|
|
479
|
+
* The STT provider to use.
|
|
480
|
+
*/
|
|
481
|
+
provider: 'azure' | 'deepgram';
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Configuration for guardrail checks to detect and prevent prohibited topics in
|
|
485
|
+
* agent output and user input.
|
|
486
|
+
*/
|
|
487
|
+
interface GuardrailConfig {
|
|
488
|
+
/**
|
|
489
|
+
* Selected prohibited user topic categories to check. When user messages contain
|
|
490
|
+
* these topics, the agent will respond with a placeholder message instead of
|
|
491
|
+
* processing the request.
|
|
492
|
+
*/
|
|
493
|
+
input_topics?: Array<'platform_integrity_jailbreaking'> | null;
|
|
494
|
+
/**
|
|
495
|
+
* Selected prohibited agent topic categories to check. When agent messages contain
|
|
496
|
+
* these topics, they will be replaced with a placeholder message.
|
|
497
|
+
*/
|
|
498
|
+
output_topics?: Array<'harassment' | 'self_harm' | 'sexual_exploitation' | 'violence' | 'defense_and_national_security' | 'illicit_and_harmful_activity' | 'gambling' | 'regulated_professional_advice' | 'child_safety_and_exploitation'> | null;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* If this option is set, the call will try to detect IVR in the first 3 minutes of
|
|
502
|
+
* the call. Actions defined will be applied when the IVR is detected. Set this to
|
|
503
|
+
* null to disable IVR detection.
|
|
504
|
+
*/
|
|
505
|
+
interface IvrOption {
|
|
506
|
+
action: IvrOption.Action;
|
|
507
|
+
}
|
|
508
|
+
namespace IvrOption {
|
|
509
|
+
interface Action {
|
|
510
|
+
type: 'hangup';
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Configuration for PII scrubbing from transcripts and recordings.
|
|
515
|
+
*/
|
|
516
|
+
interface PiiConfig {
|
|
517
|
+
/**
|
|
518
|
+
* List of PII categories to scrub from transcripts and recordings.
|
|
519
|
+
*/
|
|
520
|
+
categories: Array<'person_name' | 'address' | 'email' | 'phone_number' | 'ssn' | 'passport' | 'driver_license' | 'credit_card' | 'bank_account' | 'password' | 'pin' | 'medical_id' | 'date_of_birth' | 'customer_account_number'>;
|
|
521
|
+
/**
|
|
522
|
+
* The processing mode for PII scrubbing. Currently only post-call is supported.
|
|
523
|
+
*/
|
|
524
|
+
mode: 'post_call';
|
|
525
|
+
}
|
|
526
|
+
interface StringAnalysisData {
|
|
527
|
+
/**
|
|
528
|
+
* Description of the variable.
|
|
529
|
+
*/
|
|
530
|
+
description: string;
|
|
531
|
+
/**
|
|
532
|
+
* Name of the variable.
|
|
533
|
+
*/
|
|
534
|
+
name: string;
|
|
535
|
+
/**
|
|
536
|
+
* Type of the variable to extract.
|
|
537
|
+
*/
|
|
538
|
+
type: 'string';
|
|
539
|
+
/**
|
|
540
|
+
* Examples of the variable value to teach model the style and syntax.
|
|
541
|
+
*/
|
|
542
|
+
examples?: Array<string>;
|
|
543
|
+
}
|
|
544
|
+
interface EnumAnalysisData {
|
|
545
|
+
/**
|
|
546
|
+
* The possible values of the variable, must be non empty array.
|
|
547
|
+
*/
|
|
548
|
+
choices: Array<string>;
|
|
549
|
+
/**
|
|
550
|
+
* Description of the variable.
|
|
551
|
+
*/
|
|
552
|
+
description: string;
|
|
553
|
+
/**
|
|
554
|
+
* Name of the variable.
|
|
555
|
+
*/
|
|
556
|
+
name: string;
|
|
557
|
+
/**
|
|
558
|
+
* Type of the variable to extract.
|
|
559
|
+
*/
|
|
560
|
+
type: 'enum';
|
|
561
|
+
}
|
|
562
|
+
interface BooleanAnalysisData {
|
|
563
|
+
/**
|
|
564
|
+
* Description of the variable.
|
|
565
|
+
*/
|
|
566
|
+
description: string;
|
|
567
|
+
/**
|
|
568
|
+
* Name of the variable.
|
|
569
|
+
*/
|
|
570
|
+
name: string;
|
|
571
|
+
/**
|
|
572
|
+
* Type of the variable to extract.
|
|
573
|
+
*/
|
|
574
|
+
type: 'boolean';
|
|
575
|
+
}
|
|
576
|
+
interface NumberAnalysisData {
|
|
577
|
+
/**
|
|
578
|
+
* Description of the variable.
|
|
579
|
+
*/
|
|
580
|
+
description: string;
|
|
581
|
+
/**
|
|
582
|
+
* Name of the variable.
|
|
583
|
+
*/
|
|
584
|
+
name: string;
|
|
585
|
+
/**
|
|
586
|
+
* Type of the variable to extract.
|
|
587
|
+
*/
|
|
588
|
+
type: 'number';
|
|
589
|
+
}
|
|
590
|
+
interface PronunciationDictionary {
|
|
591
|
+
/**
|
|
592
|
+
* The phonetic alphabet to be used for pronunciation.
|
|
593
|
+
*/
|
|
594
|
+
alphabet: 'ipa' | 'cmu';
|
|
595
|
+
/**
|
|
596
|
+
* Pronunciation of the word in the format of a IPA / CMU pronunciation.
|
|
597
|
+
*/
|
|
598
|
+
phoneme: string;
|
|
599
|
+
/**
|
|
600
|
+
* The string of word / phrase to be annotated with pronunciation.
|
|
601
|
+
*/
|
|
602
|
+
word: string;
|
|
603
|
+
}
|
|
604
|
+
interface UserDtmfOptions {
|
|
605
|
+
/**
|
|
606
|
+
* The maximum number of digits allowed in the user's DTMF (Dual-Tone
|
|
607
|
+
* Multi-Frequency) input per turn. Once this limit is reached, the input is
|
|
608
|
+
* considered complete and a response will be generated immediately.
|
|
609
|
+
*/
|
|
610
|
+
digit_limit?: number | null;
|
|
611
|
+
/**
|
|
612
|
+
* A single key that signals the end of DTMF input. Acceptable values include any
|
|
613
|
+
* digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
|
|
614
|
+
*/
|
|
615
|
+
termination_key?: string | null;
|
|
616
|
+
/**
|
|
617
|
+
* The time (in milliseconds) to wait for user DTMF input before timing out. The
|
|
618
|
+
* timer resets with each digit received.
|
|
619
|
+
*/
|
|
620
|
+
timeout_ms?: number;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* If this option is set, the call will try to detect voicemail in the first 3
|
|
624
|
+
* minutes of the call. Actions defined (hangup, or leave a message) will be
|
|
625
|
+
* applied when the voicemail is detected. Set this to null to disable voicemail
|
|
626
|
+
* detection.
|
|
627
|
+
*/
|
|
628
|
+
interface VoicemailOption {
|
|
629
|
+
action: VoicemailOption.VoicemailActionPrompt | VoicemailOption.VoicemailActionStaticText | VoicemailOption.VoicemailActionHangup | VoicemailOption.VoicemailActionBridgeTransfer;
|
|
630
|
+
}
|
|
631
|
+
namespace VoicemailOption {
|
|
632
|
+
interface VoicemailActionPrompt {
|
|
633
|
+
/**
|
|
634
|
+
* The prompt used to generate the text to be spoken when the call is detected to
|
|
635
|
+
* be in voicemail.
|
|
636
|
+
*/
|
|
637
|
+
text: string;
|
|
638
|
+
type: 'prompt';
|
|
639
|
+
}
|
|
640
|
+
interface VoicemailActionStaticText {
|
|
641
|
+
/**
|
|
642
|
+
* The text to be spoken when the call is detected to be in voicemail.
|
|
643
|
+
*/
|
|
644
|
+
text: string;
|
|
645
|
+
type: 'static_text';
|
|
646
|
+
}
|
|
647
|
+
interface VoicemailActionHangup {
|
|
648
|
+
type: 'hangup';
|
|
649
|
+
}
|
|
650
|
+
interface VoicemailActionBridgeTransfer {
|
|
651
|
+
type: 'bridge_transfer';
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
export type AgentListResponse = Array<AgentResponse>;
|
|
656
|
+
export type AgentGetVersionsResponse = Array<AgentResponse>;
|
|
657
|
+
export interface AgentCreateParams {
|
|
658
|
+
/**
|
|
659
|
+
* The Response Engine to attach to the agent. It is used to generate responses for
|
|
660
|
+
* the agent. You need to create a Response Engine first before attaching it to an
|
|
661
|
+
* agent.
|
|
662
|
+
*/
|
|
663
|
+
response_engine: AgentCreateParams.ResponseEngineRetellLm | AgentCreateParams.ResponseEngineCustomLm | AgentCreateParams.ResponseEngineConversationFlow;
|
|
664
|
+
/**
|
|
665
|
+
* Unique voice id used for the agent. Find list of available voices and their
|
|
666
|
+
* preview in Dashboard.
|
|
667
|
+
*/
|
|
668
|
+
voice_id: string;
|
|
669
|
+
/**
|
|
670
|
+
* The name of the agent. Only used for your own reference.
|
|
671
|
+
*/
|
|
672
|
+
agent_name?: string | null;
|
|
673
|
+
/**
|
|
674
|
+
* If set to true, DTMF input will be accepted and processed. If false, any DTMF
|
|
675
|
+
* input will be ignored. Default to true.
|
|
676
|
+
*/
|
|
677
|
+
allow_user_dtmf?: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* If set, will add ambient environment sound to the call to make experience more
|
|
680
|
+
* realistic. Currently supports the following options:
|
|
681
|
+
*
|
|
682
|
+
* - `coffee-shop`: Coffee shop ambience with people chatting in background.
|
|
683
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
|
|
684
|
+
* - `convention-hall`: Convention hall ambience, with some echo and people
|
|
685
|
+
* chatting in background.
|
|
686
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
|
|
687
|
+
* - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
|
|
688
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
|
|
689
|
+
* - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
|
|
690
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
|
|
691
|
+
* - `static-noise`: Constant static noise.
|
|
692
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
|
|
693
|
+
* - `call-center`: Call center work noise.
|
|
694
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
|
|
695
|
+
* Set to `null` to remove ambient sound from this agent.
|
|
696
|
+
*/
|
|
697
|
+
ambient_sound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'static-noise' | 'call-center' | null;
|
|
698
|
+
/**
|
|
699
|
+
* If set, will control the volume of the ambient sound. Value ranging from [0,2].
|
|
700
|
+
* Lower value means quieter ambient sound, while higher value means louder ambient
|
|
701
|
+
* sound. If unset, default value 1 will apply.
|
|
702
|
+
*/
|
|
703
|
+
ambient_sound_volume?: number;
|
|
704
|
+
/**
|
|
705
|
+
* Prompt to determine whether the post call or chat analysis should mark the
|
|
706
|
+
* interaction as successful. Set to null to use the default prompt.
|
|
707
|
+
*/
|
|
708
|
+
analysis_successful_prompt?: string | null;
|
|
709
|
+
/**
|
|
710
|
+
* Prompt to guide how the post call or chat analysis summary should be generated.
|
|
711
|
+
* When unset, the default system prompt is used. Set to null to use the default
|
|
712
|
+
* prompt.
|
|
713
|
+
*/
|
|
714
|
+
analysis_summary_prompt?: string | null;
|
|
715
|
+
/**
|
|
716
|
+
* Only applicable when enable_backchannel is true. Controls how often the agent
|
|
717
|
+
* would backchannel when a backchannel is possible. Value ranging from [0,1].
|
|
718
|
+
* Lower value means less frequent backchannel, while higher value means more
|
|
719
|
+
* frequent backchannel. If unset, default value 0.8 will apply.
|
|
720
|
+
*/
|
|
721
|
+
backchannel_frequency?: number;
|
|
722
|
+
/**
|
|
723
|
+
* Only applicable when enable_backchannel is true. A list of words that the agent
|
|
724
|
+
* would use as backchannel. If not set, default backchannel words will apply.
|
|
725
|
+
* Check out
|
|
726
|
+
* [backchannel default words](/agent/interaction-configuration#backchannel) for
|
|
727
|
+
* more details. Note that certain voices do not work too well with certain words,
|
|
728
|
+
* so it's recommended to experiment before adding any words.
|
|
729
|
+
*/
|
|
730
|
+
backchannel_words?: Array<string> | null;
|
|
731
|
+
/**
|
|
732
|
+
* If set, will delay the first message by the specified amount of milliseconds, so
|
|
733
|
+
* that it gives user more time to prepare to take the call. Valid range is [0,
|
|
734
|
+
* 5000]. If not set or set to 0, agent will speak immediately. Only applicable
|
|
735
|
+
* when agent speaks first.
|
|
736
|
+
*/
|
|
737
|
+
begin_message_delay_ms?: number;
|
|
738
|
+
/**
|
|
739
|
+
* Provide a customized list of keywords to bias the transcriber model, so that
|
|
740
|
+
* these words are more likely to get transcribed. Commonly used for names, brands,
|
|
741
|
+
* street, etc.
|
|
742
|
+
*/
|
|
743
|
+
boosted_keywords?: Array<string> | null;
|
|
744
|
+
/**
|
|
745
|
+
* Custom STT configuration. Only used when stt_mode is set to custom.
|
|
746
|
+
*/
|
|
747
|
+
custom_stt_config?: AgentCreateParams.CustomSttConfig;
|
|
748
|
+
/**
|
|
749
|
+
* Granular setting to manage how Retell stores sensitive data (transcripts,
|
|
750
|
+
* recordings, logs, etc.). This replaces the deprecated
|
|
751
|
+
* `opt_out_sensitive_data_storage` field.
|
|
752
|
+
*
|
|
753
|
+
* - `everything`: Store all data including transcripts, recordings, and logs.
|
|
754
|
+
* - `everything_except_pii`: Store data without PII when PII is detected.
|
|
755
|
+
* - `basic_attributes_only`: Store only basic attributes; no
|
|
756
|
+
* transcripts/recordings/logs. If not set, default value of "everything" will
|
|
757
|
+
* apply.
|
|
758
|
+
*/
|
|
759
|
+
data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
|
|
760
|
+
/**
|
|
761
|
+
* If set, determines what denoising mode to use. Use "no-denoise" to bypass all
|
|
762
|
+
* audio denoising. Default to noise-cancellation.
|
|
763
|
+
*/
|
|
764
|
+
denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
|
|
765
|
+
/**
|
|
766
|
+
* Controls whether the agent would backchannel (agent interjects the speaker with
|
|
767
|
+
* phrases like "yeah", "uh-huh" to signify interest and engagement). Backchannel
|
|
768
|
+
* when enabled tends to show up more in longer user utterances. If not set, agent
|
|
769
|
+
* will not backchannel.
|
|
770
|
+
*/
|
|
771
|
+
enable_backchannel?: boolean;
|
|
772
|
+
/**
|
|
773
|
+
* If set to true, will enable dynamic voice speed adjustment based on the user's
|
|
774
|
+
* speech rate and conversation context. If unset, default value false will apply.
|
|
775
|
+
*/
|
|
776
|
+
enable_dynamic_voice_speed?: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* If set to true, will detect whether the call enters a voicemail. Note that this
|
|
779
|
+
* feature is only available for phone calls.
|
|
780
|
+
*/
|
|
781
|
+
enable_voicemail_detection?: boolean;
|
|
782
|
+
/**
|
|
783
|
+
* If users stay silent for a period after agent speech, end the call. The minimum
|
|
784
|
+
* value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
|
|
785
|
+
*/
|
|
786
|
+
end_call_after_silence_ms?: number;
|
|
787
|
+
/**
|
|
788
|
+
* When TTS provider for the selected voice is experiencing outages, we would use
|
|
789
|
+
* fallback voices listed here for the agent. Voice id and the fallback voice ids
|
|
790
|
+
* must be from different TTS providers. The system would go through the list in
|
|
791
|
+
* order, if the first one in the list is also having outage, it would use the next
|
|
792
|
+
* one. Set to null to remove voice fallback for the agent.
|
|
793
|
+
*/
|
|
794
|
+
fallback_voice_ids?: Array<string> | null;
|
|
795
|
+
/**
|
|
796
|
+
* Configuration for guardrail checks to detect and prevent prohibited topics in
|
|
797
|
+
* agent output and user input.
|
|
798
|
+
*/
|
|
799
|
+
guardrail_config?: AgentCreateParams.GuardrailConfig;
|
|
800
|
+
/**
|
|
801
|
+
* Controls how sensitive the agent is to user interruptions. Value ranging from
|
|
802
|
+
* [0,1]. Lower value means it will take longer / more words for user to interrupt
|
|
803
|
+
* agent, while higher value means it's easier for user to interrupt agent. If
|
|
804
|
+
* unset, default value 1 will apply. When this is set to 0, agent would never be
|
|
805
|
+
* interrupted.
|
|
806
|
+
*/
|
|
807
|
+
interruption_sensitivity?: number;
|
|
808
|
+
/**
|
|
809
|
+
* Whether the agent is public. When set to true, the agent is available for public
|
|
810
|
+
* agent preview link.
|
|
811
|
+
*/
|
|
812
|
+
is_public?: boolean | null;
|
|
813
|
+
/**
|
|
814
|
+
* If this option is set, the call will try to detect IVR in the first 3 minutes of
|
|
815
|
+
* the call. Actions defined will be applied when the IVR is detected. Set this to
|
|
816
|
+
* null to disable IVR detection.
|
|
817
|
+
*/
|
|
818
|
+
ivr_option?: AgentCreateParams.IvrOption | null;
|
|
819
|
+
/**
|
|
820
|
+
* Specifies what language (and dialect) the speech recognition will operate in.
|
|
821
|
+
* For instance, selecting `en-GB` optimizes speech recognition for British
|
|
822
|
+
* English. If unset, will use default value `en-US`. Select `multi` for
|
|
823
|
+
* multilingual support.
|
|
824
|
+
*/
|
|
825
|
+
language?: 'en-US' | 'en-IN' | 'en-GB' | 'en-AU' | 'en-NZ' | 'de-DE' | 'es-ES' | 'es-419' | 'hi-IN' | 'fr-FR' | 'fr-CA' | 'ja-JP' | 'pt-PT' | 'pt-BR' | 'zh-CN' | 'ru-RU' | 'it-IT' | 'ko-KR' | 'nl-NL' | 'nl-BE' | 'pl-PL' | 'tr-TR' | 'vi-VN' | 'ro-RO' | 'bg-BG' | 'ca-ES' | 'th-TH' | 'da-DK' | 'fi-FI' | 'el-GR' | 'hu-HU' | 'id-ID' | 'no-NO' | 'sk-SK' | 'sv-SE' | 'lt-LT' | 'lv-LV' | 'cs-CZ' | 'ms-MY' | 'af-ZA' | 'ar-SA' | 'az-AZ' | 'bs-BA' | 'cy-GB' | 'fa-IR' | 'fil-PH' | 'gl-ES' | 'he-IL' | 'hr-HR' | 'hy-AM' | 'is-IS' | 'kk-KZ' | 'kn-IN' | 'mk-MK' | 'mr-IN' | 'ne-NP' | 'sl-SI' | 'sr-RS' | 'sw-KE' | 'ta-IN' | 'ur-IN' | 'yue-CN' | 'uk-UA' | 'multi';
|
|
826
|
+
/**
|
|
827
|
+
* Maximum allowed length for the call, will force end the call if reached. The
|
|
828
|
+
* minimum value allowed is 60,000 ms (1 min), and maximum value allowed is
|
|
829
|
+
* 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).
|
|
830
|
+
*/
|
|
831
|
+
max_call_duration_ms?: number;
|
|
832
|
+
/**
|
|
833
|
+
* If set to true, will normalize the some part of text (number, currency, date,
|
|
834
|
+
* etc) to spoken to its spoken form for more consistent speech synthesis
|
|
835
|
+
* (sometimes the voice synthesize system itself might read these wrong with the
|
|
836
|
+
* raw text). For example, it will convert "Call my number 2137112342 on Jul 5th,
|
|
837
|
+
* 2024 for the $24.12 payment" to "Call my number two one three seven one one two
|
|
838
|
+
* three four two on july fifth, twenty twenty four for the twenty four dollars
|
|
839
|
+
* twelve cents payment" before starting audio generation.
|
|
840
|
+
*/
|
|
841
|
+
normalize_for_speech?: boolean;
|
|
842
|
+
/**
|
|
843
|
+
* Whether this agent opts in for signed URLs for public logs and recordings. When
|
|
844
|
+
* enabled, the generated URLs will include security signatures that restrict
|
|
845
|
+
* access and automatically expire after 24 hours.
|
|
846
|
+
*/
|
|
847
|
+
opt_in_signed_url?: boolean;
|
|
848
|
+
/**
|
|
849
|
+
* Configuration for PII scrubbing from transcripts and recordings.
|
|
850
|
+
*/
|
|
851
|
+
pii_config?: AgentCreateParams.PiiConfig;
|
|
852
|
+
/**
|
|
853
|
+
* Post call analysis data to extract from the call. This data will augment the
|
|
854
|
+
* pre-defined variables extracted in the call analysis. This will be available
|
|
855
|
+
* after the call ends.
|
|
856
|
+
*/
|
|
857
|
+
post_call_analysis_data?: Array<AgentCreateParams.StringAnalysisData | AgentCreateParams.EnumAnalysisData | AgentCreateParams.BooleanAnalysisData | AgentCreateParams.NumberAnalysisData> | null;
|
|
858
|
+
/**
|
|
859
|
+
* The model to use for post call analysis. Default to gpt-4.1-mini.
|
|
860
|
+
*/
|
|
861
|
+
post_call_analysis_model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
862
|
+
/**
|
|
863
|
+
* A list of words / phrases and their pronunciation to be used to guide the audio
|
|
864
|
+
* synthesize for consistent pronunciation. Currently only supported for English &
|
|
865
|
+
* 11labs voices. Set to null to remove pronunciation dictionary from this agent.
|
|
866
|
+
*/
|
|
867
|
+
pronunciation_dictionary?: Array<AgentCreateParams.PronunciationDictionary> | null;
|
|
868
|
+
/**
|
|
869
|
+
* If set, controls how many times agent would remind user when user is
|
|
870
|
+
* unresponsive. Must be a non negative integer. If unset, default value of 1 will
|
|
871
|
+
* apply (remind once). Set to 0 to disable agent from reminding.
|
|
872
|
+
*/
|
|
873
|
+
reminder_max_count?: number;
|
|
874
|
+
/**
|
|
875
|
+
* If set (in milliseconds), will trigger a reminder to the agent to speak if the
|
|
876
|
+
* user has been silent for the specified duration after some agent speech. Must be
|
|
877
|
+
* a positive number. If unset, default value of 10000 ms (10 s) will apply.
|
|
878
|
+
*/
|
|
879
|
+
reminder_trigger_ms?: number;
|
|
880
|
+
/**
|
|
881
|
+
* Controls how responsive is the agent. Value ranging from [0,1]. Lower value
|
|
882
|
+
* means less responsive agent (wait more, respond slower), while higher value
|
|
883
|
+
* means faster exchanges (respond when it can). If unset, default value 1 will
|
|
884
|
+
* apply.
|
|
885
|
+
*/
|
|
886
|
+
responsiveness?: number;
|
|
887
|
+
/**
|
|
888
|
+
* If set, the phone ringing will last for the specified amount of milliseconds.
|
|
889
|
+
* This applies for both outbound call ringtime, and call transfer ringtime.
|
|
890
|
+
* Default to 30000 (30 s). Valid range is [5000, 90000].
|
|
891
|
+
*/
|
|
892
|
+
ring_duration_ms?: number;
|
|
893
|
+
/**
|
|
894
|
+
* The expiration time for the signed url in milliseconds. Only applicable when
|
|
895
|
+
* opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will
|
|
896
|
+
* apply.
|
|
897
|
+
*/
|
|
898
|
+
signed_url_expiration_ms?: number | null;
|
|
899
|
+
/**
|
|
900
|
+
* If set, determines whether speech to text should focus on latency or accuracy.
|
|
901
|
+
* Default to fast mode. When set to custom, custom_stt_config must be provided.
|
|
902
|
+
*/
|
|
903
|
+
stt_mode?: 'fast' | 'accurate' | 'custom';
|
|
904
|
+
user_dtmf_options?: AgentCreateParams.UserDtmfOptions | null;
|
|
905
|
+
/**
|
|
906
|
+
* Optional description of the agent version. Used for your own reference and
|
|
907
|
+
* documentation.
|
|
908
|
+
*/
|
|
909
|
+
version_description?: string | null;
|
|
910
|
+
/**
|
|
911
|
+
* If set, determines the vocabulary set to use for transcription. This setting
|
|
912
|
+
* only applies for English agents, for non English agent, this setting is a no-op.
|
|
913
|
+
* Default to general.
|
|
914
|
+
*/
|
|
915
|
+
vocab_specialization?: 'general' | 'medical';
|
|
916
|
+
/**
|
|
917
|
+
* Controls the emotional tone of the agent's voice. Currently supported for
|
|
918
|
+
* Cartesia and Minimax TTS providers. If unset, no emotion will be used.
|
|
919
|
+
*/
|
|
920
|
+
voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised' | null;
|
|
921
|
+
/**
|
|
922
|
+
* Select the voice model used for the selected voice. Each provider has a set of
|
|
923
|
+
* available voice models. Set to null to remove voice model selection, and default
|
|
924
|
+
* ones will apply. Check out dashboard for more details of each voice model.
|
|
925
|
+
*/
|
|
926
|
+
voice_model?: 'eleven_turbo_v2' | 'eleven_flash_v2' | 'eleven_turbo_v2_5' | 'eleven_flash_v2_5' | 'eleven_multilingual_v2' | 'sonic-2' | 'sonic-3' | 'sonic-3-latest' | 'sonic-turbo' | 'tts-1' | 'gpt-4o-mini-tts' | 'speech-02-turbo' | 'speech-2.8-turbo' | null;
|
|
927
|
+
/**
|
|
928
|
+
* Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower
|
|
929
|
+
* speech, while higher value means faster speech rate. If unset, default value 1
|
|
930
|
+
* will apply.
|
|
931
|
+
*/
|
|
932
|
+
voice_speed?: number;
|
|
933
|
+
/**
|
|
934
|
+
* Controls how stable the voice is. Value ranging from [0,2]. Lower value means
|
|
935
|
+
* more stable, and higher value means more variant speech generation. Currently
|
|
936
|
+
* this setting only applies to `11labs` voices. If unset, default value 1 will
|
|
937
|
+
* apply.
|
|
938
|
+
*/
|
|
939
|
+
voice_temperature?: number;
|
|
940
|
+
/**
|
|
941
|
+
* Configures when to stop running voicemail detection, as it becomes unlikely to
|
|
942
|
+
* hit voicemail after a couple minutes, and keep running it will only have
|
|
943
|
+
* negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value
|
|
944
|
+
* allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
|
|
945
|
+
*/
|
|
946
|
+
voicemail_detection_timeout_ms?: number;
|
|
947
|
+
/**
|
|
948
|
+
* The message to be played when the call enters a voicemail. Note that this
|
|
949
|
+
* feature is only available for phone calls. If you want to hangup after hitting
|
|
950
|
+
* voicemail, set this to empty string.
|
|
951
|
+
*/
|
|
952
|
+
voicemail_message?: string;
|
|
953
|
+
/**
|
|
954
|
+
* If this option is set, the call will try to detect voicemail in the first 3
|
|
955
|
+
* minutes of the call. Actions defined (hangup, or leave a message) will be
|
|
956
|
+
* applied when the voicemail is detected. Set this to null to disable voicemail
|
|
957
|
+
* detection.
|
|
958
|
+
*/
|
|
959
|
+
voicemail_option?: AgentCreateParams.VoicemailOption | null;
|
|
960
|
+
/**
|
|
961
|
+
* If set, will control the volume of the agent. Value ranging from [0,2]. Lower
|
|
962
|
+
* value means quieter agent speech, while higher value means louder agent speech.
|
|
963
|
+
* If unset, default value 1 will apply.
|
|
964
|
+
*/
|
|
965
|
+
volume?: number;
|
|
966
|
+
/**
|
|
967
|
+
* Which webhook events this agent should receive. If not set, defaults to
|
|
968
|
+
* call_started, call_ended, call_analyzed.
|
|
969
|
+
*/
|
|
970
|
+
webhook_events?: Array<'call_started' | 'call_ended' | 'call_analyzed' | 'transcript_updated' | 'transfer_started' | 'transfer_bridged' | 'transfer_cancelled' | 'transfer_ended'> | null;
|
|
971
|
+
/**
|
|
972
|
+
* The timeout for the webhook in milliseconds. If not set, default value of 10000
|
|
973
|
+
* will apply.
|
|
974
|
+
*/
|
|
975
|
+
webhook_timeout_ms?: number;
|
|
976
|
+
/**
|
|
977
|
+
* The webhook for agent to listen to call events. See what events it would get at
|
|
978
|
+
* [webhook doc](/features/webhook). If set, will binds webhook events for this
|
|
979
|
+
* agent to the specified url, and will ignore the account level webhook for this
|
|
980
|
+
* agent. Set to `null` to remove webhook url from this agent.
|
|
981
|
+
*/
|
|
982
|
+
webhook_url?: string | null;
|
|
983
|
+
}
|
|
984
|
+
export declare namespace AgentCreateParams {
|
|
985
|
+
interface ResponseEngineRetellLm {
|
|
986
|
+
/**
|
|
987
|
+
* id of the Retell LLM Response Engine.
|
|
988
|
+
*/
|
|
989
|
+
llm_id: string;
|
|
990
|
+
/**
|
|
991
|
+
* type of the Response Engine.
|
|
992
|
+
*/
|
|
993
|
+
type: 'retell-llm';
|
|
994
|
+
/**
|
|
995
|
+
* Version of the Retell LLM Response Engine.
|
|
996
|
+
*/
|
|
997
|
+
version?: number | null;
|
|
998
|
+
}
|
|
999
|
+
interface ResponseEngineCustomLm {
|
|
1000
|
+
/**
|
|
1001
|
+
* LLM websocket url of the custom LLM.
|
|
1002
|
+
*/
|
|
1003
|
+
llm_websocket_url: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* type of the Response Engine.
|
|
1006
|
+
*/
|
|
1007
|
+
type: 'custom-llm';
|
|
1008
|
+
}
|
|
1009
|
+
interface ResponseEngineConversationFlow {
|
|
1010
|
+
/**
|
|
1011
|
+
* ID of the Conversation Flow Response Engine.
|
|
1012
|
+
*/
|
|
1013
|
+
conversation_flow_id: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* type of the Response Engine.
|
|
1016
|
+
*/
|
|
1017
|
+
type: 'conversation-flow';
|
|
1018
|
+
/**
|
|
1019
|
+
* Version of the Conversation Flow Response Engine.
|
|
1020
|
+
*/
|
|
1021
|
+
version?: number | null;
|
|
1022
|
+
}
|
|
1023
|
+
/**
|
|
1024
|
+
* Custom STT configuration. Only used when stt_mode is set to custom.
|
|
1025
|
+
*/
|
|
1026
|
+
interface CustomSttConfig {
|
|
1027
|
+
/**
|
|
1028
|
+
* Endpointing timeout in milliseconds. Minimum is 100 for azure, 10 for deepgram.
|
|
1029
|
+
*/
|
|
1030
|
+
endpointing_ms: number;
|
|
1031
|
+
/**
|
|
1032
|
+
* The STT provider to use.
|
|
1033
|
+
*/
|
|
1034
|
+
provider: 'azure' | 'deepgram';
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Configuration for guardrail checks to detect and prevent prohibited topics in
|
|
1038
|
+
* agent output and user input.
|
|
1039
|
+
*/
|
|
1040
|
+
interface GuardrailConfig {
|
|
1041
|
+
/**
|
|
1042
|
+
* Selected prohibited user topic categories to check. When user messages contain
|
|
1043
|
+
* these topics, the agent will respond with a placeholder message instead of
|
|
1044
|
+
* processing the request.
|
|
1045
|
+
*/
|
|
1046
|
+
input_topics?: Array<'platform_integrity_jailbreaking'> | null;
|
|
1047
|
+
/**
|
|
1048
|
+
* Selected prohibited agent topic categories to check. When agent messages contain
|
|
1049
|
+
* these topics, they will be replaced with a placeholder message.
|
|
1050
|
+
*/
|
|
1051
|
+
output_topics?: Array<'harassment' | 'self_harm' | 'sexual_exploitation' | 'violence' | 'defense_and_national_security' | 'illicit_and_harmful_activity' | 'gambling' | 'regulated_professional_advice' | 'child_safety_and_exploitation'> | null;
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* If this option is set, the call will try to detect IVR in the first 3 minutes of
|
|
1055
|
+
* the call. Actions defined will be applied when the IVR is detected. Set this to
|
|
1056
|
+
* null to disable IVR detection.
|
|
1057
|
+
*/
|
|
1058
|
+
interface IvrOption {
|
|
1059
|
+
action: IvrOption.Action;
|
|
1060
|
+
}
|
|
1061
|
+
namespace IvrOption {
|
|
1062
|
+
interface Action {
|
|
1063
|
+
type: 'hangup';
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
/**
|
|
1067
|
+
* Configuration for PII scrubbing from transcripts and recordings.
|
|
1068
|
+
*/
|
|
1069
|
+
interface PiiConfig {
|
|
1070
|
+
/**
|
|
1071
|
+
* List of PII categories to scrub from transcripts and recordings.
|
|
1072
|
+
*/
|
|
1073
|
+
categories: Array<'person_name' | 'address' | 'email' | 'phone_number' | 'ssn' | 'passport' | 'driver_license' | 'credit_card' | 'bank_account' | 'password' | 'pin' | 'medical_id' | 'date_of_birth' | 'customer_account_number'>;
|
|
1074
|
+
/**
|
|
1075
|
+
* The processing mode for PII scrubbing. Currently only post-call is supported.
|
|
1076
|
+
*/
|
|
1077
|
+
mode: 'post_call';
|
|
1078
|
+
}
|
|
1079
|
+
interface StringAnalysisData {
|
|
1080
|
+
/**
|
|
1081
|
+
* Description of the variable.
|
|
1082
|
+
*/
|
|
1083
|
+
description: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Name of the variable.
|
|
1086
|
+
*/
|
|
1087
|
+
name: string;
|
|
1088
|
+
/**
|
|
1089
|
+
* Type of the variable to extract.
|
|
1090
|
+
*/
|
|
1091
|
+
type: 'string';
|
|
1092
|
+
/**
|
|
1093
|
+
* Examples of the variable value to teach model the style and syntax.
|
|
1094
|
+
*/
|
|
1095
|
+
examples?: Array<string>;
|
|
1096
|
+
}
|
|
1097
|
+
interface EnumAnalysisData {
|
|
1098
|
+
/**
|
|
1099
|
+
* The possible values of the variable, must be non empty array.
|
|
1100
|
+
*/
|
|
1101
|
+
choices: Array<string>;
|
|
1102
|
+
/**
|
|
1103
|
+
* Description of the variable.
|
|
1104
|
+
*/
|
|
1105
|
+
description: string;
|
|
1106
|
+
/**
|
|
1107
|
+
* Name of the variable.
|
|
1108
|
+
*/
|
|
1109
|
+
name: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* Type of the variable to extract.
|
|
1112
|
+
*/
|
|
1113
|
+
type: 'enum';
|
|
1114
|
+
}
|
|
1115
|
+
interface BooleanAnalysisData {
|
|
1116
|
+
/**
|
|
1117
|
+
* Description of the variable.
|
|
1118
|
+
*/
|
|
1119
|
+
description: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* Name of the variable.
|
|
1122
|
+
*/
|
|
1123
|
+
name: string;
|
|
1124
|
+
/**
|
|
1125
|
+
* Type of the variable to extract.
|
|
1126
|
+
*/
|
|
1127
|
+
type: 'boolean';
|
|
1128
|
+
}
|
|
1129
|
+
interface NumberAnalysisData {
|
|
1130
|
+
/**
|
|
1131
|
+
* Description of the variable.
|
|
1132
|
+
*/
|
|
1133
|
+
description: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* Name of the variable.
|
|
1136
|
+
*/
|
|
1137
|
+
name: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Type of the variable to extract.
|
|
1140
|
+
*/
|
|
1141
|
+
type: 'number';
|
|
1142
|
+
}
|
|
1143
|
+
interface PronunciationDictionary {
|
|
1144
|
+
/**
|
|
1145
|
+
* The phonetic alphabet to be used for pronunciation.
|
|
1146
|
+
*/
|
|
1147
|
+
alphabet: 'ipa' | 'cmu';
|
|
1148
|
+
/**
|
|
1149
|
+
* Pronunciation of the word in the format of a IPA / CMU pronunciation.
|
|
1150
|
+
*/
|
|
1151
|
+
phoneme: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* The string of word / phrase to be annotated with pronunciation.
|
|
1154
|
+
*/
|
|
1155
|
+
word: string;
|
|
1156
|
+
}
|
|
1157
|
+
interface UserDtmfOptions {
|
|
1158
|
+
/**
|
|
1159
|
+
* The maximum number of digits allowed in the user's DTMF (Dual-Tone
|
|
1160
|
+
* Multi-Frequency) input per turn. Once this limit is reached, the input is
|
|
1161
|
+
* considered complete and a response will be generated immediately.
|
|
1162
|
+
*/
|
|
1163
|
+
digit_limit?: number | null;
|
|
1164
|
+
/**
|
|
1165
|
+
* A single key that signals the end of DTMF input. Acceptable values include any
|
|
1166
|
+
* digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
|
|
1167
|
+
*/
|
|
1168
|
+
termination_key?: string | null;
|
|
1169
|
+
/**
|
|
1170
|
+
* The time (in milliseconds) to wait for user DTMF input before timing out. The
|
|
1171
|
+
* timer resets with each digit received.
|
|
1172
|
+
*/
|
|
1173
|
+
timeout_ms?: number;
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* If this option is set, the call will try to detect voicemail in the first 3
|
|
1177
|
+
* minutes of the call. Actions defined (hangup, or leave a message) will be
|
|
1178
|
+
* applied when the voicemail is detected. Set this to null to disable voicemail
|
|
1179
|
+
* detection.
|
|
1180
|
+
*/
|
|
1181
|
+
interface VoicemailOption {
|
|
1182
|
+
action: VoicemailOption.VoicemailActionPrompt | VoicemailOption.VoicemailActionStaticText | VoicemailOption.VoicemailActionHangup | VoicemailOption.VoicemailActionBridgeTransfer;
|
|
1183
|
+
}
|
|
1184
|
+
namespace VoicemailOption {
|
|
1185
|
+
interface VoicemailActionPrompt {
|
|
1186
|
+
/**
|
|
1187
|
+
* The prompt used to generate the text to be spoken when the call is detected to
|
|
1188
|
+
* be in voicemail.
|
|
1189
|
+
*/
|
|
1190
|
+
text: string;
|
|
1191
|
+
type: 'prompt';
|
|
1192
|
+
}
|
|
1193
|
+
interface VoicemailActionStaticText {
|
|
1194
|
+
/**
|
|
1195
|
+
* The text to be spoken when the call is detected to be in voicemail.
|
|
1196
|
+
*/
|
|
1197
|
+
text: string;
|
|
1198
|
+
type: 'static_text';
|
|
1199
|
+
}
|
|
1200
|
+
interface VoicemailActionHangup {
|
|
1201
|
+
type: 'hangup';
|
|
1202
|
+
}
|
|
1203
|
+
interface VoicemailActionBridgeTransfer {
|
|
1204
|
+
type: 'bridge_transfer';
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
export interface AgentRetrieveParams {
|
|
1209
|
+
/**
|
|
1210
|
+
* Optional version of the API to use for this request. If not provided, will
|
|
1211
|
+
* default to latest version.
|
|
1212
|
+
*/
|
|
1213
|
+
version?: number;
|
|
1214
|
+
}
|
|
1215
|
+
export interface AgentUpdateParams {
|
|
1216
|
+
/**
|
|
1217
|
+
* Query param: Optional version of the API to use for this request. Default to
|
|
1218
|
+
* latest version.
|
|
1219
|
+
*/
|
|
1220
|
+
version?: number;
|
|
1221
|
+
/**
|
|
1222
|
+
* Body param: The name of the agent. Only used for your own reference.
|
|
1223
|
+
*/
|
|
1224
|
+
agent_name?: string | null;
|
|
1225
|
+
/**
|
|
1226
|
+
* Body param: If set to true, DTMF input will be accepted and processed. If false,
|
|
1227
|
+
* any DTMF input will be ignored. Default to true.
|
|
1228
|
+
*/
|
|
1229
|
+
allow_user_dtmf?: boolean;
|
|
1230
|
+
/**
|
|
1231
|
+
* Body param: If set, will add ambient environment sound to the call to make
|
|
1232
|
+
* experience more realistic. Currently supports the following options:
|
|
1233
|
+
*
|
|
1234
|
+
* - `coffee-shop`: Coffee shop ambience with people chatting in background.
|
|
1235
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
|
|
1236
|
+
* - `convention-hall`: Convention hall ambience, with some echo and people
|
|
1237
|
+
* chatting in background.
|
|
1238
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
|
|
1239
|
+
* - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
|
|
1240
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
|
|
1241
|
+
* - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
|
|
1242
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
|
|
1243
|
+
* - `static-noise`: Constant static noise.
|
|
1244
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
|
|
1245
|
+
* - `call-center`: Call center work noise.
|
|
1246
|
+
* [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
|
|
1247
|
+
* Set to `null` to remove ambient sound from this agent.
|
|
1248
|
+
*/
|
|
1249
|
+
ambient_sound?: 'coffee-shop' | 'convention-hall' | 'summer-outdoor' | 'mountain-outdoor' | 'static-noise' | 'call-center' | null;
|
|
1250
|
+
/**
|
|
1251
|
+
* Body param: If set, will control the volume of the ambient sound. Value ranging
|
|
1252
|
+
* from [0,2]. Lower value means quieter ambient sound, while higher value means
|
|
1253
|
+
* louder ambient sound. If unset, default value 1 will apply.
|
|
1254
|
+
*/
|
|
1255
|
+
ambient_sound_volume?: number;
|
|
1256
|
+
/**
|
|
1257
|
+
* Body param: Prompt to determine whether the post call or chat analysis should
|
|
1258
|
+
* mark the interaction as successful. Set to null to use the default prompt.
|
|
1259
|
+
*/
|
|
1260
|
+
analysis_successful_prompt?: string | null;
|
|
1261
|
+
/**
|
|
1262
|
+
* Body param: Prompt to guide how the post call or chat analysis summary should be
|
|
1263
|
+
* generated. When unset, the default system prompt is used. Set to null to use the
|
|
1264
|
+
* default prompt.
|
|
1265
|
+
*/
|
|
1266
|
+
analysis_summary_prompt?: string | null;
|
|
1267
|
+
/**
|
|
1268
|
+
* Body param: Only applicable when enable_backchannel is true. Controls how often
|
|
1269
|
+
* the agent would backchannel when a backchannel is possible. Value ranging from
|
|
1270
|
+
* [0,1]. Lower value means less frequent backchannel, while higher value means
|
|
1271
|
+
* more frequent backchannel. If unset, default value 0.8 will apply.
|
|
1272
|
+
*/
|
|
1273
|
+
backchannel_frequency?: number;
|
|
1274
|
+
/**
|
|
1275
|
+
* Body param: Only applicable when enable_backchannel is true. A list of words
|
|
1276
|
+
* that the agent would use as backchannel. If not set, default backchannel words
|
|
1277
|
+
* will apply. Check out
|
|
1278
|
+
* [backchannel default words](/agent/interaction-configuration#backchannel) for
|
|
1279
|
+
* more details. Note that certain voices do not work too well with certain words,
|
|
1280
|
+
* so it's recommended to experiment before adding any words.
|
|
1281
|
+
*/
|
|
1282
|
+
backchannel_words?: Array<string> | null;
|
|
1283
|
+
/**
|
|
1284
|
+
* Body param: If set, will delay the first message by the specified amount of
|
|
1285
|
+
* milliseconds, so that it gives user more time to prepare to take the call. Valid
|
|
1286
|
+
* range is [0, 5000]. If not set or set to 0, agent will speak immediately. Only
|
|
1287
|
+
* applicable when agent speaks first.
|
|
1288
|
+
*/
|
|
1289
|
+
begin_message_delay_ms?: number;
|
|
1290
|
+
/**
|
|
1291
|
+
* Body param: Provide a customized list of keywords to bias the transcriber model,
|
|
1292
|
+
* so that these words are more likely to get transcribed. Commonly used for names,
|
|
1293
|
+
* brands, street, etc.
|
|
1294
|
+
*/
|
|
1295
|
+
boosted_keywords?: Array<string> | null;
|
|
1296
|
+
/**
|
|
1297
|
+
* Body param: Custom STT configuration. Only used when stt_mode is set to custom.
|
|
1298
|
+
*/
|
|
1299
|
+
custom_stt_config?: AgentUpdateParams.CustomSttConfig;
|
|
1300
|
+
/**
|
|
1301
|
+
* Body param: Granular setting to manage how Retell stores sensitive data
|
|
1302
|
+
* (transcripts, recordings, logs, etc.). This replaces the deprecated
|
|
1303
|
+
* `opt_out_sensitive_data_storage` field.
|
|
1304
|
+
*
|
|
1305
|
+
* - `everything`: Store all data including transcripts, recordings, and logs.
|
|
1306
|
+
* - `everything_except_pii`: Store data without PII when PII is detected.
|
|
1307
|
+
* - `basic_attributes_only`: Store only basic attributes; no
|
|
1308
|
+
* transcripts/recordings/logs. If not set, default value of "everything" will
|
|
1309
|
+
* apply.
|
|
1310
|
+
*/
|
|
1311
|
+
data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
|
|
1312
|
+
/**
|
|
1313
|
+
* Body param: If set, determines what denoising mode to use. Use "no-denoise" to
|
|
1314
|
+
* bypass all audio denoising. Default to noise-cancellation.
|
|
1315
|
+
*/
|
|
1316
|
+
denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
|
|
1317
|
+
/**
|
|
1318
|
+
* Body param: Controls whether the agent would backchannel (agent interjects the
|
|
1319
|
+
* speaker with phrases like "yeah", "uh-huh" to signify interest and engagement).
|
|
1320
|
+
* Backchannel when enabled tends to show up more in longer user utterances. If not
|
|
1321
|
+
* set, agent will not backchannel.
|
|
1322
|
+
*/
|
|
1323
|
+
enable_backchannel?: boolean;
|
|
1324
|
+
/**
|
|
1325
|
+
* Body param: If set to true, will enable dynamic voice speed adjustment based on
|
|
1326
|
+
* the user's speech rate and conversation context. If unset, default value false
|
|
1327
|
+
* will apply.
|
|
1328
|
+
*/
|
|
1329
|
+
enable_dynamic_voice_speed?: boolean;
|
|
1330
|
+
/**
|
|
1331
|
+
* Body param: If set to true, will detect whether the call enters a voicemail.
|
|
1332
|
+
* Note that this feature is only available for phone calls.
|
|
1333
|
+
*/
|
|
1334
|
+
enable_voicemail_detection?: boolean;
|
|
1335
|
+
/**
|
|
1336
|
+
* Body param: If users stay silent for a period after agent speech, end the call.
|
|
1337
|
+
* The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000
|
|
1338
|
+
* (10 min).
|
|
1339
|
+
*/
|
|
1340
|
+
end_call_after_silence_ms?: number;
|
|
1341
|
+
/**
|
|
1342
|
+
* Body param: When TTS provider for the selected voice is experiencing outages, we
|
|
1343
|
+
* would use fallback voices listed here for the agent. Voice id and the fallback
|
|
1344
|
+
* voice ids must be from different TTS providers. The system would go through the
|
|
1345
|
+
* list in order, if the first one in the list is also having outage, it would use
|
|
1346
|
+
* the next one. Set to null to remove voice fallback for the agent.
|
|
1347
|
+
*/
|
|
1348
|
+
fallback_voice_ids?: Array<string> | null;
|
|
1349
|
+
/**
|
|
1350
|
+
* Body param: Configuration for guardrail checks to detect and prevent prohibited
|
|
1351
|
+
* topics in agent output and user input.
|
|
1352
|
+
*/
|
|
1353
|
+
guardrail_config?: AgentUpdateParams.GuardrailConfig;
|
|
1354
|
+
/**
|
|
1355
|
+
* Body param: Controls how sensitive the agent is to user interruptions. Value
|
|
1356
|
+
* ranging from [0,1]. Lower value means it will take longer / more words for user
|
|
1357
|
+
* to interrupt agent, while higher value means it's easier for user to interrupt
|
|
1358
|
+
* agent. If unset, default value 1 will apply. When this is set to 0, agent would
|
|
1359
|
+
* never be interrupted.
|
|
1360
|
+
*/
|
|
1361
|
+
interruption_sensitivity?: number;
|
|
1362
|
+
/**
|
|
1363
|
+
* Body param: Whether the agent is public. When set to true, the agent is
|
|
1364
|
+
* available for public agent preview link.
|
|
1365
|
+
*/
|
|
1366
|
+
is_public?: boolean | null;
|
|
1367
|
+
/**
|
|
1368
|
+
* Body param: If this option is set, the call will try to detect IVR in the first
|
|
1369
|
+
* 3 minutes of the call. Actions defined will be applied when the IVR is detected.
|
|
1370
|
+
* Set this to null to disable IVR detection.
|
|
1371
|
+
*/
|
|
1372
|
+
ivr_option?: AgentUpdateParams.IvrOption | null;
|
|
1373
|
+
/**
|
|
1374
|
+
* Body param: Specifies what language (and dialect) the speech recognition will
|
|
1375
|
+
* operate in. For instance, selecting `en-GB` optimizes speech recognition for
|
|
1376
|
+
* British English. If unset, will use default value `en-US`. Select `multi` for
|
|
1377
|
+
* multilingual support.
|
|
1378
|
+
*/
|
|
1379
|
+
language?: 'en-US' | 'en-IN' | 'en-GB' | 'en-AU' | 'en-NZ' | 'de-DE' | 'es-ES' | 'es-419' | 'hi-IN' | 'fr-FR' | 'fr-CA' | 'ja-JP' | 'pt-PT' | 'pt-BR' | 'zh-CN' | 'ru-RU' | 'it-IT' | 'ko-KR' | 'nl-NL' | 'nl-BE' | 'pl-PL' | 'tr-TR' | 'vi-VN' | 'ro-RO' | 'bg-BG' | 'ca-ES' | 'th-TH' | 'da-DK' | 'fi-FI' | 'el-GR' | 'hu-HU' | 'id-ID' | 'no-NO' | 'sk-SK' | 'sv-SE' | 'lt-LT' | 'lv-LV' | 'cs-CZ' | 'ms-MY' | 'af-ZA' | 'ar-SA' | 'az-AZ' | 'bs-BA' | 'cy-GB' | 'fa-IR' | 'fil-PH' | 'gl-ES' | 'he-IL' | 'hr-HR' | 'hy-AM' | 'is-IS' | 'kk-KZ' | 'kn-IN' | 'mk-MK' | 'mr-IN' | 'ne-NP' | 'sl-SI' | 'sr-RS' | 'sw-KE' | 'ta-IN' | 'ur-IN' | 'yue-CN' | 'uk-UA' | 'multi';
|
|
1380
|
+
/**
|
|
1381
|
+
* Body param: Maximum allowed length for the call, will force end the call if
|
|
1382
|
+
* reached. The minimum value allowed is 60,000 ms (1 min), and maximum value
|
|
1383
|
+
* allowed is 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).
|
|
1384
|
+
*/
|
|
1385
|
+
max_call_duration_ms?: number;
|
|
1386
|
+
/**
|
|
1387
|
+
* Body param: If set to true, will normalize the some part of text (number,
|
|
1388
|
+
* currency, date, etc) to spoken to its spoken form for more consistent speech
|
|
1389
|
+
* synthesis (sometimes the voice synthesize system itself might read these wrong
|
|
1390
|
+
* with the raw text). For example, it will convert "Call my number 2137112342 on
|
|
1391
|
+
* Jul 5th, 2024 for the $24.12 payment" to "Call my number two one three seven one
|
|
1392
|
+
* one two three four two on july fifth, twenty twenty four for the twenty four
|
|
1393
|
+
* dollars twelve cents payment" before starting audio generation.
|
|
1394
|
+
*/
|
|
1395
|
+
normalize_for_speech?: boolean;
|
|
1396
|
+
/**
|
|
1397
|
+
* Body param: Whether this agent opts in for signed URLs for public logs and
|
|
1398
|
+
* recordings. When enabled, the generated URLs will include security signatures
|
|
1399
|
+
* that restrict access and automatically expire after 24 hours.
|
|
1400
|
+
*/
|
|
1401
|
+
opt_in_signed_url?: boolean;
|
|
1402
|
+
/**
|
|
1403
|
+
* Body param: Configuration for PII scrubbing from transcripts and recordings.
|
|
1404
|
+
*/
|
|
1405
|
+
pii_config?: AgentUpdateParams.PiiConfig;
|
|
1406
|
+
/**
|
|
1407
|
+
* Body param: Post call analysis data to extract from the call. This data will
|
|
1408
|
+
* augment the pre-defined variables extracted in the call analysis. This will be
|
|
1409
|
+
* available after the call ends.
|
|
1410
|
+
*/
|
|
1411
|
+
post_call_analysis_data?: Array<AgentUpdateParams.StringAnalysisData | AgentUpdateParams.EnumAnalysisData | AgentUpdateParams.BooleanAnalysisData | AgentUpdateParams.NumberAnalysisData> | null;
|
|
1412
|
+
/**
|
|
1413
|
+
* Body param: The model to use for post call analysis. Default to gpt-4.1-mini.
|
|
1414
|
+
*/
|
|
1415
|
+
post_call_analysis_model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
1416
|
+
/**
|
|
1417
|
+
* Body param: A list of words / phrases and their pronunciation to be used to
|
|
1418
|
+
* guide the audio synthesize for consistent pronunciation. Currently only
|
|
1419
|
+
* supported for English & 11labs voices. Set to null to remove pronunciation
|
|
1420
|
+
* dictionary from this agent.
|
|
1421
|
+
*/
|
|
1422
|
+
pronunciation_dictionary?: Array<AgentUpdateParams.PronunciationDictionary> | null;
|
|
1423
|
+
/**
|
|
1424
|
+
* Body param: If set, controls how many times agent would remind user when user is
|
|
1425
|
+
* unresponsive. Must be a non negative integer. If unset, default value of 1 will
|
|
1426
|
+
* apply (remind once). Set to 0 to disable agent from reminding.
|
|
1427
|
+
*/
|
|
1428
|
+
reminder_max_count?: number;
|
|
1429
|
+
/**
|
|
1430
|
+
* Body param: If set (in milliseconds), will trigger a reminder to the agent to
|
|
1431
|
+
* speak if the user has been silent for the specified duration after some agent
|
|
1432
|
+
* speech. Must be a positive number. If unset, default value of 10000 ms (10 s)
|
|
1433
|
+
* will apply.
|
|
1434
|
+
*/
|
|
1435
|
+
reminder_trigger_ms?: number;
|
|
1436
|
+
/**
|
|
1437
|
+
* Body param: The Response Engine to attach to the agent. It is used to generate
|
|
1438
|
+
* responses for the agent. You need to create a Response Engine first before
|
|
1439
|
+
* attaching it to an agent.
|
|
1440
|
+
*/
|
|
1441
|
+
response_engine?: AgentUpdateParams.ResponseEngineRetellLm | AgentUpdateParams.ResponseEngineCustomLm | AgentUpdateParams.ResponseEngineConversationFlow;
|
|
1442
|
+
/**
|
|
1443
|
+
* Body param: Controls how responsive is the agent. Value ranging from [0,1].
|
|
1444
|
+
* Lower value means less responsive agent (wait more, respond slower), while
|
|
1445
|
+
* higher value means faster exchanges (respond when it can). If unset, default
|
|
1446
|
+
* value 1 will apply.
|
|
1447
|
+
*/
|
|
1448
|
+
responsiveness?: number;
|
|
1449
|
+
/**
|
|
1450
|
+
* Body param: If set, the phone ringing will last for the specified amount of
|
|
1451
|
+
* milliseconds. This applies for both outbound call ringtime, and call transfer
|
|
1452
|
+
* ringtime. Default to 30000 (30 s). Valid range is [5000, 90000].
|
|
1453
|
+
*/
|
|
1454
|
+
ring_duration_ms?: number;
|
|
1455
|
+
/**
|
|
1456
|
+
* Body param: The expiration time for the signed url in milliseconds. Only
|
|
1457
|
+
* applicable when opt_in_signed_url is true. If not set, default value of 86400000
|
|
1458
|
+
* (24 hours) will apply.
|
|
1459
|
+
*/
|
|
1460
|
+
signed_url_expiration_ms?: number | null;
|
|
1461
|
+
/**
|
|
1462
|
+
* Body param: If set, determines whether speech to text should focus on latency or
|
|
1463
|
+
* accuracy. Default to fast mode. When set to custom, custom_stt_config must be
|
|
1464
|
+
* provided.
|
|
1465
|
+
*/
|
|
1466
|
+
stt_mode?: 'fast' | 'accurate' | 'custom';
|
|
1467
|
+
/**
|
|
1468
|
+
* Body param
|
|
1469
|
+
*/
|
|
1470
|
+
user_dtmf_options?: AgentUpdateParams.UserDtmfOptions | null;
|
|
1471
|
+
/**
|
|
1472
|
+
* Body param: Optional description of the agent version. Used for your own
|
|
1473
|
+
* reference and documentation.
|
|
1474
|
+
*/
|
|
1475
|
+
version_description?: string | null;
|
|
1476
|
+
/**
|
|
1477
|
+
* Body param: If set, determines the vocabulary set to use for transcription. This
|
|
1478
|
+
* setting only applies for English agents, for non English agent, this setting is
|
|
1479
|
+
* a no-op. Default to general.
|
|
1480
|
+
*/
|
|
1481
|
+
vocab_specialization?: 'general' | 'medical';
|
|
1482
|
+
/**
|
|
1483
|
+
* Body param: Controls the emotional tone of the agent's voice. Currently
|
|
1484
|
+
* supported for Cartesia and Minimax TTS providers. If unset, no emotion will be
|
|
1485
|
+
* used.
|
|
1486
|
+
*/
|
|
1487
|
+
voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised' | null;
|
|
1488
|
+
/**
|
|
1489
|
+
* Body param: Unique voice id used for the agent. Find list of available voices
|
|
1490
|
+
* and their preview in Dashboard.
|
|
1491
|
+
*/
|
|
1492
|
+
voice_id?: string;
|
|
1493
|
+
/**
|
|
1494
|
+
* Body param: Select the voice model used for the selected voice. Each provider
|
|
1495
|
+
* has a set of available voice models. Set to null to remove voice model
|
|
1496
|
+
* selection, and default ones will apply. Check out dashboard for more details of
|
|
1497
|
+
* each voice model.
|
|
1498
|
+
*/
|
|
1499
|
+
voice_model?: 'eleven_turbo_v2' | 'eleven_flash_v2' | 'eleven_turbo_v2_5' | 'eleven_flash_v2_5' | 'eleven_multilingual_v2' | 'sonic-2' | 'sonic-3' | 'sonic-3-latest' | 'sonic-turbo' | 'tts-1' | 'gpt-4o-mini-tts' | 'speech-02-turbo' | 'speech-2.8-turbo' | null;
|
|
1500
|
+
/**
|
|
1501
|
+
* Body param: Controls speed of voice. Value ranging from [0.5,2]. Lower value
|
|
1502
|
+
* means slower speech, while higher value means faster speech rate. If unset,
|
|
1503
|
+
* default value 1 will apply.
|
|
1504
|
+
*/
|
|
1505
|
+
voice_speed?: number;
|
|
1506
|
+
/**
|
|
1507
|
+
* Body param: Controls how stable the voice is. Value ranging from [0,2]. Lower
|
|
1508
|
+
* value means more stable, and higher value means more variant speech generation.
|
|
1509
|
+
* Currently this setting only applies to `11labs` voices. If unset, default value
|
|
1510
|
+
* 1 will apply.
|
|
1511
|
+
*/
|
|
1512
|
+
voice_temperature?: number;
|
|
1513
|
+
/**
|
|
1514
|
+
* Body param: Configures when to stop running voicemail detection, as it becomes
|
|
1515
|
+
* unlikely to hit voicemail after a couple minutes, and keep running it will only
|
|
1516
|
+
* have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum
|
|
1517
|
+
* value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
|
|
1518
|
+
*/
|
|
1519
|
+
voicemail_detection_timeout_ms?: number;
|
|
1520
|
+
/**
|
|
1521
|
+
* Body param: The message to be played when the call enters a voicemail. Note that
|
|
1522
|
+
* this feature is only available for phone calls. If you want to hangup after
|
|
1523
|
+
* hitting voicemail, set this to empty string.
|
|
1524
|
+
*/
|
|
1525
|
+
voicemail_message?: string;
|
|
1526
|
+
/**
|
|
1527
|
+
* Body param: If this option is set, the call will try to detect voicemail in the
|
|
1528
|
+
* first 3 minutes of the call. Actions defined (hangup, or leave a message) will
|
|
1529
|
+
* be applied when the voicemail is detected. Set this to null to disable voicemail
|
|
1530
|
+
* detection.
|
|
1531
|
+
*/
|
|
1532
|
+
voicemail_option?: AgentUpdateParams.VoicemailOption | null;
|
|
1533
|
+
/**
|
|
1534
|
+
* Body param: If set, will control the volume of the agent. Value ranging from
|
|
1535
|
+
* [0,2]. Lower value means quieter agent speech, while higher value means louder
|
|
1536
|
+
* agent speech. If unset, default value 1 will apply.
|
|
1537
|
+
*/
|
|
1538
|
+
volume?: number;
|
|
1539
|
+
/**
|
|
1540
|
+
* Body param: Which webhook events this agent should receive. If not set, defaults
|
|
1541
|
+
* to call_started, call_ended, call_analyzed.
|
|
1542
|
+
*/
|
|
1543
|
+
webhook_events?: Array<'call_started' | 'call_ended' | 'call_analyzed' | 'transcript_updated' | 'transfer_started' | 'transfer_bridged' | 'transfer_cancelled' | 'transfer_ended'> | null;
|
|
1544
|
+
/**
|
|
1545
|
+
* Body param: The timeout for the webhook in milliseconds. If not set, default
|
|
1546
|
+
* value of 10000 will apply.
|
|
1547
|
+
*/
|
|
1548
|
+
webhook_timeout_ms?: number;
|
|
1549
|
+
/**
|
|
1550
|
+
* Body param: The webhook for agent to listen to call events. See what events it
|
|
1551
|
+
* would get at [webhook doc](/features/webhook). If set, will binds webhook events
|
|
1552
|
+
* for this agent to the specified url, and will ignore the account level webhook
|
|
1553
|
+
* for this agent. Set to `null` to remove webhook url from this agent.
|
|
1554
|
+
*/
|
|
1555
|
+
webhook_url?: string | null;
|
|
1556
|
+
}
|
|
1557
|
+
export declare namespace AgentUpdateParams {
|
|
1558
|
+
/**
|
|
1559
|
+
* Custom STT configuration. Only used when stt_mode is set to custom.
|
|
1560
|
+
*/
|
|
1561
|
+
interface CustomSttConfig {
|
|
1562
|
+
/**
|
|
1563
|
+
* Endpointing timeout in milliseconds. Minimum is 100 for azure, 10 for deepgram.
|
|
1564
|
+
*/
|
|
1565
|
+
endpointing_ms: number;
|
|
1566
|
+
/**
|
|
1567
|
+
* The STT provider to use.
|
|
1568
|
+
*/
|
|
1569
|
+
provider: 'azure' | 'deepgram';
|
|
1570
|
+
}
|
|
1571
|
+
/**
|
|
1572
|
+
* Configuration for guardrail checks to detect and prevent prohibited topics in
|
|
1573
|
+
* agent output and user input.
|
|
1574
|
+
*/
|
|
1575
|
+
interface GuardrailConfig {
|
|
1576
|
+
/**
|
|
1577
|
+
* Selected prohibited user topic categories to check. When user messages contain
|
|
1578
|
+
* these topics, the agent will respond with a placeholder message instead of
|
|
1579
|
+
* processing the request.
|
|
1580
|
+
*/
|
|
1581
|
+
input_topics?: Array<'platform_integrity_jailbreaking'> | null;
|
|
1582
|
+
/**
|
|
1583
|
+
* Selected prohibited agent topic categories to check. When agent messages contain
|
|
1584
|
+
* these topics, they will be replaced with a placeholder message.
|
|
1585
|
+
*/
|
|
1586
|
+
output_topics?: Array<'harassment' | 'self_harm' | 'sexual_exploitation' | 'violence' | 'defense_and_national_security' | 'illicit_and_harmful_activity' | 'gambling' | 'regulated_professional_advice' | 'child_safety_and_exploitation'> | null;
|
|
1587
|
+
}
|
|
1588
|
+
/**
|
|
1589
|
+
* If this option is set, the call will try to detect IVR in the first 3 minutes of
|
|
1590
|
+
* the call. Actions defined will be applied when the IVR is detected. Set this to
|
|
1591
|
+
* null to disable IVR detection.
|
|
1592
|
+
*/
|
|
1593
|
+
interface IvrOption {
|
|
1594
|
+
action: IvrOption.Action;
|
|
1595
|
+
}
|
|
1596
|
+
namespace IvrOption {
|
|
1597
|
+
interface Action {
|
|
1598
|
+
type: 'hangup';
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Configuration for PII scrubbing from transcripts and recordings.
|
|
1603
|
+
*/
|
|
1604
|
+
interface PiiConfig {
|
|
1605
|
+
/**
|
|
1606
|
+
* List of PII categories to scrub from transcripts and recordings.
|
|
1607
|
+
*/
|
|
1608
|
+
categories: Array<'person_name' | 'address' | 'email' | 'phone_number' | 'ssn' | 'passport' | 'driver_license' | 'credit_card' | 'bank_account' | 'password' | 'pin' | 'medical_id' | 'date_of_birth' | 'customer_account_number'>;
|
|
1609
|
+
/**
|
|
1610
|
+
* The processing mode for PII scrubbing. Currently only post-call is supported.
|
|
1611
|
+
*/
|
|
1612
|
+
mode: 'post_call';
|
|
1613
|
+
}
|
|
1614
|
+
interface StringAnalysisData {
|
|
1615
|
+
/**
|
|
1616
|
+
* Description of the variable.
|
|
1617
|
+
*/
|
|
1618
|
+
description: string;
|
|
1619
|
+
/**
|
|
1620
|
+
* Name of the variable.
|
|
1621
|
+
*/
|
|
1622
|
+
name: string;
|
|
1623
|
+
/**
|
|
1624
|
+
* Type of the variable to extract.
|
|
1625
|
+
*/
|
|
1626
|
+
type: 'string';
|
|
1627
|
+
/**
|
|
1628
|
+
* Examples of the variable value to teach model the style and syntax.
|
|
1629
|
+
*/
|
|
1630
|
+
examples?: Array<string>;
|
|
1631
|
+
}
|
|
1632
|
+
interface EnumAnalysisData {
|
|
1633
|
+
/**
|
|
1634
|
+
* The possible values of the variable, must be non empty array.
|
|
1635
|
+
*/
|
|
1636
|
+
choices: Array<string>;
|
|
1637
|
+
/**
|
|
1638
|
+
* Description of the variable.
|
|
1639
|
+
*/
|
|
1640
|
+
description: string;
|
|
1641
|
+
/**
|
|
1642
|
+
* Name of the variable.
|
|
1643
|
+
*/
|
|
1644
|
+
name: string;
|
|
1645
|
+
/**
|
|
1646
|
+
* Type of the variable to extract.
|
|
1647
|
+
*/
|
|
1648
|
+
type: 'enum';
|
|
1649
|
+
}
|
|
1650
|
+
interface BooleanAnalysisData {
|
|
1651
|
+
/**
|
|
1652
|
+
* Description of the variable.
|
|
1653
|
+
*/
|
|
1654
|
+
description: string;
|
|
1655
|
+
/**
|
|
1656
|
+
* Name of the variable.
|
|
1657
|
+
*/
|
|
1658
|
+
name: string;
|
|
1659
|
+
/**
|
|
1660
|
+
* Type of the variable to extract.
|
|
1661
|
+
*/
|
|
1662
|
+
type: 'boolean';
|
|
1663
|
+
}
|
|
1664
|
+
interface NumberAnalysisData {
|
|
1665
|
+
/**
|
|
1666
|
+
* Description of the variable.
|
|
1667
|
+
*/
|
|
1668
|
+
description: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* Name of the variable.
|
|
1671
|
+
*/
|
|
1672
|
+
name: string;
|
|
1673
|
+
/**
|
|
1674
|
+
* Type of the variable to extract.
|
|
1675
|
+
*/
|
|
1676
|
+
type: 'number';
|
|
1677
|
+
}
|
|
1678
|
+
interface PronunciationDictionary {
|
|
1679
|
+
/**
|
|
1680
|
+
* The phonetic alphabet to be used for pronunciation.
|
|
1681
|
+
*/
|
|
1682
|
+
alphabet: 'ipa' | 'cmu';
|
|
1683
|
+
/**
|
|
1684
|
+
* Pronunciation of the word in the format of a IPA / CMU pronunciation.
|
|
1685
|
+
*/
|
|
1686
|
+
phoneme: string;
|
|
1687
|
+
/**
|
|
1688
|
+
* The string of word / phrase to be annotated with pronunciation.
|
|
1689
|
+
*/
|
|
1690
|
+
word: string;
|
|
1691
|
+
}
|
|
1692
|
+
interface ResponseEngineRetellLm {
|
|
1693
|
+
/**
|
|
1694
|
+
* id of the Retell LLM Response Engine.
|
|
1695
|
+
*/
|
|
1696
|
+
llm_id: string;
|
|
1697
|
+
/**
|
|
1698
|
+
* type of the Response Engine.
|
|
1699
|
+
*/
|
|
1700
|
+
type: 'retell-llm';
|
|
1701
|
+
/**
|
|
1702
|
+
* Version of the Retell LLM Response Engine.
|
|
1703
|
+
*/
|
|
1704
|
+
version?: number | null;
|
|
1705
|
+
}
|
|
1706
|
+
interface ResponseEngineCustomLm {
|
|
1707
|
+
/**
|
|
1708
|
+
* LLM websocket url of the custom LLM.
|
|
1709
|
+
*/
|
|
1710
|
+
llm_websocket_url: string;
|
|
1711
|
+
/**
|
|
1712
|
+
* type of the Response Engine.
|
|
1713
|
+
*/
|
|
1714
|
+
type: 'custom-llm';
|
|
1715
|
+
}
|
|
1716
|
+
interface ResponseEngineConversationFlow {
|
|
1717
|
+
/**
|
|
1718
|
+
* ID of the Conversation Flow Response Engine.
|
|
1719
|
+
*/
|
|
1720
|
+
conversation_flow_id: string;
|
|
1721
|
+
/**
|
|
1722
|
+
* type of the Response Engine.
|
|
1723
|
+
*/
|
|
1724
|
+
type: 'conversation-flow';
|
|
1725
|
+
/**
|
|
1726
|
+
* Version of the Conversation Flow Response Engine.
|
|
1727
|
+
*/
|
|
1728
|
+
version?: number | null;
|
|
1729
|
+
}
|
|
1730
|
+
interface UserDtmfOptions {
|
|
1731
|
+
/**
|
|
1732
|
+
* The maximum number of digits allowed in the user's DTMF (Dual-Tone
|
|
1733
|
+
* Multi-Frequency) input per turn. Once this limit is reached, the input is
|
|
1734
|
+
* considered complete and a response will be generated immediately.
|
|
1735
|
+
*/
|
|
1736
|
+
digit_limit?: number | null;
|
|
1737
|
+
/**
|
|
1738
|
+
* A single key that signals the end of DTMF input. Acceptable values include any
|
|
1739
|
+
* digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
|
|
1740
|
+
*/
|
|
1741
|
+
termination_key?: string | null;
|
|
1742
|
+
/**
|
|
1743
|
+
* The time (in milliseconds) to wait for user DTMF input before timing out. The
|
|
1744
|
+
* timer resets with each digit received.
|
|
1745
|
+
*/
|
|
1746
|
+
timeout_ms?: number;
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* If this option is set, the call will try to detect voicemail in the first 3
|
|
1750
|
+
* minutes of the call. Actions defined (hangup, or leave a message) will be
|
|
1751
|
+
* applied when the voicemail is detected. Set this to null to disable voicemail
|
|
1752
|
+
* detection.
|
|
1753
|
+
*/
|
|
1754
|
+
interface VoicemailOption {
|
|
1755
|
+
action: VoicemailOption.VoicemailActionPrompt | VoicemailOption.VoicemailActionStaticText | VoicemailOption.VoicemailActionHangup | VoicemailOption.VoicemailActionBridgeTransfer;
|
|
1756
|
+
}
|
|
1757
|
+
namespace VoicemailOption {
|
|
1758
|
+
interface VoicemailActionPrompt {
|
|
1759
|
+
/**
|
|
1760
|
+
* The prompt used to generate the text to be spoken when the call is detected to
|
|
1761
|
+
* be in voicemail.
|
|
1762
|
+
*/
|
|
1763
|
+
text: string;
|
|
1764
|
+
type: 'prompt';
|
|
1765
|
+
}
|
|
1766
|
+
interface VoicemailActionStaticText {
|
|
1767
|
+
/**
|
|
1768
|
+
* The text to be spoken when the call is detected to be in voicemail.
|
|
1769
|
+
*/
|
|
1770
|
+
text: string;
|
|
1771
|
+
type: 'static_text';
|
|
1772
|
+
}
|
|
1773
|
+
interface VoicemailActionHangup {
|
|
1774
|
+
type: 'hangup';
|
|
1775
|
+
}
|
|
1776
|
+
interface VoicemailActionBridgeTransfer {
|
|
1777
|
+
type: 'bridge_transfer';
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
export interface AgentListParams {
|
|
1782
|
+
/**
|
|
1783
|
+
* A limit on the number of objects to be returned. Limit can range between 1 and
|
|
1784
|
+
* 1000, and the default is 1000.
|
|
1785
|
+
*/
|
|
1786
|
+
limit?: number;
|
|
1787
|
+
/**
|
|
1788
|
+
* The pagination key to continue fetching the next page of agents. Pagination key
|
|
1789
|
+
* is represented by a agent id, pagination key and version pair is exclusive (not
|
|
1790
|
+
* included in the fetched page). If not set, will start from the beginning.
|
|
1791
|
+
*/
|
|
1792
|
+
pagination_key?: string;
|
|
1793
|
+
/**
|
|
1794
|
+
* Specifies the version of the agent associated with the pagination_key. When
|
|
1795
|
+
* paginating, both the pagination_key and its version must be provided to ensure
|
|
1796
|
+
* consistent ordering and to fetch the next page correctly.
|
|
1797
|
+
*/
|
|
1798
|
+
pagination_key_version?: number;
|
|
1799
|
+
}
|
|
1800
|
+
export declare namespace Agent {
|
|
1801
|
+
export { type AgentResponse as AgentResponse, type AgentListResponse as AgentListResponse, type AgentGetVersionsResponse as AgentGetVersionsResponse, type AgentCreateParams as AgentCreateParams, type AgentRetrieveParams as AgentRetrieveParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, };
|
|
1802
|
+
}
|
|
1803
|
+
//# sourceMappingURL=agent.d.mts.map
|