retell-sdk 4.66.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 -1346
- 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 +374 -78
- 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 +219 -27
- 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 +553 -107
- 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 +529 -95
- package/src/resources/batch-call.ts +291 -24
- package/src/resources/call.ts +754 -105
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { APIResource } from "../resource.js";
|
|
2
|
-
import
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
3
4
|
export declare class PhoneNumber extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* Buy a new phone number & Bind agents
|
|
@@ -10,7 +11,7 @@ export declare class PhoneNumber extends APIResource {
|
|
|
10
11
|
* await client.phoneNumber.create();
|
|
11
12
|
* ```
|
|
12
13
|
*/
|
|
13
|
-
create(body: PhoneNumberCreateParams, options?:
|
|
14
|
+
create(body: PhoneNumberCreateParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
14
15
|
/**
|
|
15
16
|
* Retrieve details of a specific phone number
|
|
16
17
|
*
|
|
@@ -20,7 +21,7 @@ export declare class PhoneNumber extends APIResource {
|
|
|
20
21
|
* await client.phoneNumber.retrieve('+14157774444');
|
|
21
22
|
* ```
|
|
22
23
|
*/
|
|
23
|
-
retrieve(phoneNumber: string, options?:
|
|
24
|
+
retrieve(phoneNumber: string, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
24
25
|
/**
|
|
25
26
|
* Update agent bound to a purchased phone number
|
|
26
27
|
*
|
|
@@ -36,7 +37,7 @@ export declare class PhoneNumber extends APIResource {
|
|
|
36
37
|
* );
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
|
-
update(phoneNumber: string, body: PhoneNumberUpdateParams, options?:
|
|
40
|
+
update(phoneNumber: string, body: PhoneNumberUpdateParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
40
41
|
/**
|
|
41
42
|
* List all phone numbers
|
|
42
43
|
*
|
|
@@ -46,7 +47,7 @@ export declare class PhoneNumber extends APIResource {
|
|
|
46
47
|
* await client.phoneNumber.list();
|
|
47
48
|
* ```
|
|
48
49
|
*/
|
|
49
|
-
list(options?:
|
|
50
|
+
list(options?: RequestOptions): APIPromise<PhoneNumberListResponse>;
|
|
50
51
|
/**
|
|
51
52
|
* Delete an existing phone number
|
|
52
53
|
*
|
|
@@ -55,7 +56,7 @@ export declare class PhoneNumber extends APIResource {
|
|
|
55
56
|
* await client.phoneNumber.delete('+14157774444');
|
|
56
57
|
* ```
|
|
57
58
|
*/
|
|
58
|
-
delete(phoneNumber: string, options?:
|
|
59
|
+
delete(phoneNumber: string, options?: RequestOptions): APIPromise<void>;
|
|
59
60
|
/**
|
|
60
61
|
* Import a phone number from custom telephony & Bind agents
|
|
61
62
|
*
|
|
@@ -69,7 +70,7 @@ export declare class PhoneNumber extends APIResource {
|
|
|
69
70
|
* );
|
|
70
71
|
* ```
|
|
71
72
|
*/
|
|
72
|
-
import(body: PhoneNumberImportParams, options?:
|
|
73
|
+
import(body: PhoneNumberImportParams, options?: RequestOptions): APIPromise<PhoneNumberResponse>;
|
|
73
74
|
}
|
|
74
75
|
export interface PhoneNumberResponse {
|
|
75
76
|
/**
|
|
@@ -82,11 +83,32 @@ export interface PhoneNumberResponse {
|
|
|
82
83
|
* characters), used as the unique identifier for phone number APIs.
|
|
83
84
|
*/
|
|
84
85
|
phone_number: string;
|
|
86
|
+
/**
|
|
87
|
+
* Type of the phone number.
|
|
88
|
+
*/
|
|
89
|
+
phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom';
|
|
90
|
+
/**
|
|
91
|
+
* List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
|
|
92
|
+
* If not set or empty, calls from all countries are allowed.
|
|
93
|
+
*/
|
|
94
|
+
allowed_inbound_country_list?: Array<string> | null;
|
|
95
|
+
/**
|
|
96
|
+
* List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
|
|
97
|
+
* not set or empty, calls to all countries are allowed.
|
|
98
|
+
*/
|
|
99
|
+
allowed_outbound_country_list?: Array<string> | null;
|
|
85
100
|
/**
|
|
86
101
|
* Area code of the number to obtain. Format is a 3 digit integer. Currently only
|
|
87
102
|
* supports US area code.
|
|
88
103
|
*/
|
|
89
104
|
area_code?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Enterprise only. Phone number to transfer inbound calls to when organization is
|
|
107
|
+
* in outage mode. Can be either a Retell phone number or an external number.
|
|
108
|
+
* Cannot be the same as this phone number, and cannot be a number that already has
|
|
109
|
+
* its own fallback configured (prevents nested forwarding).
|
|
110
|
+
*/
|
|
111
|
+
fallback_number?: string | null;
|
|
90
112
|
/**
|
|
91
113
|
* Unique id of agent to bind to the number. The number will automatically use the
|
|
92
114
|
* agent when receiving inbound calls. If null, this number would not accept
|
|
@@ -98,6 +120,25 @@ export interface PhoneNumberResponse {
|
|
|
98
120
|
* default to latest version.
|
|
99
121
|
*/
|
|
100
122
|
inbound_agent_version?: number | null;
|
|
123
|
+
/**
|
|
124
|
+
* Inbound agents to bind to the number with weights. If set and non-empty, one
|
|
125
|
+
* agent will be picked randomly for each inbound call, with probability
|
|
126
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
127
|
+
* fallback to inbound_agent_id.
|
|
128
|
+
*/
|
|
129
|
+
inbound_agents?: Array<PhoneNumberResponse.InboundAgent> | null;
|
|
130
|
+
/**
|
|
131
|
+
* Inbound SMS agents to bind to the number with weights. If set and non-empty, one
|
|
132
|
+
* agent will be picked randomly for each inbound SMS, with probability
|
|
133
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
134
|
+
* fallback to inbound_sms_agent_id.
|
|
135
|
+
*/
|
|
136
|
+
inbound_sms_agents?: Array<PhoneNumberResponse.InboundSMSAgent> | null;
|
|
137
|
+
/**
|
|
138
|
+
* If set, will send a webhook for inbound SMS, where you can override agent id,
|
|
139
|
+
* set dynamic variables and other fields specific to that chat.
|
|
140
|
+
*/
|
|
141
|
+
inbound_sms_webhook_url?: string | null;
|
|
101
142
|
/**
|
|
102
143
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
103
144
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -119,16 +160,90 @@ export interface PhoneNumberResponse {
|
|
|
119
160
|
*/
|
|
120
161
|
outbound_agent_version?: number | null;
|
|
121
162
|
/**
|
|
122
|
-
*
|
|
163
|
+
* Outbound agents to bind to the number with weights. If set and non-empty, one
|
|
164
|
+
* agent will be picked randomly for each outbound call, with probability
|
|
165
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
166
|
+
* fallback to outbound_agent_id.
|
|
123
167
|
*/
|
|
124
|
-
|
|
168
|
+
outbound_agents?: Array<PhoneNumberResponse.OutboundAgent> | null;
|
|
125
169
|
/**
|
|
126
|
-
*
|
|
170
|
+
* Outbound SMS agents to bind to the number with weights. If set and non-empty,
|
|
171
|
+
* one agent will be picked randomly for each outbound SMS, with probability
|
|
172
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
173
|
+
* fallback to outbound_sms_agent_id.
|
|
127
174
|
*/
|
|
128
|
-
|
|
175
|
+
outbound_sms_agents?: Array<PhoneNumberResponse.OutboundSMSAgent> | null;
|
|
176
|
+
/**
|
|
177
|
+
* Pretty printed phone number, provided for your reference.
|
|
178
|
+
*/
|
|
179
|
+
phone_number_pretty?: string;
|
|
180
|
+
sip_outbound_trunk_config?: PhoneNumberResponse.SipOutboundTrunkConfig | null;
|
|
181
|
+
}
|
|
182
|
+
export declare namespace PhoneNumberResponse {
|
|
183
|
+
interface InboundAgent {
|
|
184
|
+
agent_id: string;
|
|
185
|
+
/**
|
|
186
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
187
|
+
* add up to 1.
|
|
188
|
+
*/
|
|
189
|
+
weight: number;
|
|
190
|
+
agent_version?: number;
|
|
191
|
+
}
|
|
192
|
+
interface InboundSMSAgent {
|
|
193
|
+
agent_id: string;
|
|
194
|
+
/**
|
|
195
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
196
|
+
* add up to 1.
|
|
197
|
+
*/
|
|
198
|
+
weight: number;
|
|
199
|
+
agent_version?: number;
|
|
200
|
+
}
|
|
201
|
+
interface OutboundAgent {
|
|
202
|
+
agent_id: string;
|
|
203
|
+
/**
|
|
204
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
205
|
+
* add up to 1.
|
|
206
|
+
*/
|
|
207
|
+
weight: number;
|
|
208
|
+
agent_version?: number;
|
|
209
|
+
}
|
|
210
|
+
interface OutboundSMSAgent {
|
|
211
|
+
agent_id: string;
|
|
212
|
+
/**
|
|
213
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
214
|
+
* add up to 1.
|
|
215
|
+
*/
|
|
216
|
+
weight: number;
|
|
217
|
+
agent_version?: number;
|
|
218
|
+
}
|
|
219
|
+
interface SipOutboundTrunkConfig {
|
|
220
|
+
/**
|
|
221
|
+
* The username used for authenticating the SIP trunk for the phone number.
|
|
222
|
+
*/
|
|
223
|
+
auth_username?: string | null;
|
|
224
|
+
/**
|
|
225
|
+
* The termination URI for the SIP trunk for the phone number.
|
|
226
|
+
*/
|
|
227
|
+
termination_uri?: string | null;
|
|
228
|
+
/**
|
|
229
|
+
* Outbound transport protocol for the SIP trunk for the phone number. Valid values
|
|
230
|
+
* are "TLS", "TCP" and "UDP". Default is "TCP".
|
|
231
|
+
*/
|
|
232
|
+
transport?: string | null;
|
|
233
|
+
}
|
|
129
234
|
}
|
|
130
235
|
export type PhoneNumberListResponse = Array<PhoneNumberResponse>;
|
|
131
236
|
export interface PhoneNumberCreateParams {
|
|
237
|
+
/**
|
|
238
|
+
* List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
|
|
239
|
+
* If not set or empty, calls from all countries are allowed.
|
|
240
|
+
*/
|
|
241
|
+
allowed_inbound_country_list?: Array<string> | null;
|
|
242
|
+
/**
|
|
243
|
+
* List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
|
|
244
|
+
* not set or empty, calls to all countries are allowed.
|
|
245
|
+
*/
|
|
246
|
+
allowed_outbound_country_list?: Array<string> | null;
|
|
132
247
|
/**
|
|
133
248
|
* Area code of the number to obtain. Format is a 3 digit integer. Currently only
|
|
134
249
|
* supports US area code.
|
|
@@ -139,6 +254,13 @@ export interface PhoneNumberCreateParams {
|
|
|
139
254
|
* left empty, will default to "US".
|
|
140
255
|
*/
|
|
141
256
|
country_code?: 'US' | 'CA';
|
|
257
|
+
/**
|
|
258
|
+
* Enterprise only. Phone number to transfer inbound calls to when organization is
|
|
259
|
+
* in outage mode. Can be either a Retell phone number or an external number.
|
|
260
|
+
* Cannot be the same as this phone number, and cannot be a number that already has
|
|
261
|
+
* its own fallback configured (prevents nested forwarding).
|
|
262
|
+
*/
|
|
263
|
+
fallback_number?: string | null;
|
|
142
264
|
/**
|
|
143
265
|
* Unique id of agent to bind to the number. The number will automatically use the
|
|
144
266
|
* agent when receiving inbound calls. If null, this number would not accept
|
|
@@ -150,6 +272,13 @@ export interface PhoneNumberCreateParams {
|
|
|
150
272
|
* default to latest version.
|
|
151
273
|
*/
|
|
152
274
|
inbound_agent_version?: number | null;
|
|
275
|
+
/**
|
|
276
|
+
* Inbound agents to bind to the number with weights. If set and non-empty, one
|
|
277
|
+
* agent will be picked randomly for each inbound call, with probability
|
|
278
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
279
|
+
* fallback to inbound_agent_id.
|
|
280
|
+
*/
|
|
281
|
+
inbound_agents?: Array<PhoneNumberCreateParams.InboundAgent> | null;
|
|
153
282
|
/**
|
|
154
283
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
155
284
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -174,6 +303,13 @@ export interface PhoneNumberCreateParams {
|
|
|
174
303
|
* default to latest version.
|
|
175
304
|
*/
|
|
176
305
|
outbound_agent_version?: number | null;
|
|
306
|
+
/**
|
|
307
|
+
* Outbound agents to bind to the number with weights. If set and non-empty, one
|
|
308
|
+
* agent will be picked randomly for each outbound call, with probability
|
|
309
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
310
|
+
* fallback to outbound_agent_id.
|
|
311
|
+
*/
|
|
312
|
+
outbound_agents?: Array<PhoneNumberCreateParams.OutboundAgent> | null;
|
|
177
313
|
/**
|
|
178
314
|
* The number you are trying to purchase in E.164 format of the number (+country
|
|
179
315
|
* code then number with no space and no special characters).
|
|
@@ -183,8 +319,61 @@ export interface PhoneNumberCreateParams {
|
|
|
183
319
|
* Whether to purchase a toll-free number. Toll-free numbers incur higher costs.
|
|
184
320
|
*/
|
|
185
321
|
toll_free?: boolean;
|
|
322
|
+
/**
|
|
323
|
+
* Outbound transport protocol to use for the phone number. Valid values are "TLS",
|
|
324
|
+
* "TCP" and "UDP". Default is "TCP".
|
|
325
|
+
*/
|
|
326
|
+
transport?: string | null;
|
|
327
|
+
}
|
|
328
|
+
export declare namespace PhoneNumberCreateParams {
|
|
329
|
+
interface InboundAgent {
|
|
330
|
+
agent_id: string;
|
|
331
|
+
/**
|
|
332
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
333
|
+
* add up to 1.
|
|
334
|
+
*/
|
|
335
|
+
weight: number;
|
|
336
|
+
agent_version?: number;
|
|
337
|
+
}
|
|
338
|
+
interface OutboundAgent {
|
|
339
|
+
agent_id: string;
|
|
340
|
+
/**
|
|
341
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
342
|
+
* add up to 1.
|
|
343
|
+
*/
|
|
344
|
+
weight: number;
|
|
345
|
+
agent_version?: number;
|
|
346
|
+
}
|
|
186
347
|
}
|
|
187
348
|
export interface PhoneNumberUpdateParams {
|
|
349
|
+
/**
|
|
350
|
+
* List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
|
|
351
|
+
* If not set or empty, calls from all countries are allowed.
|
|
352
|
+
*/
|
|
353
|
+
allowed_inbound_country_list?: Array<string> | null;
|
|
354
|
+
/**
|
|
355
|
+
* List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
|
|
356
|
+
* not set or empty, calls to all countries are allowed.
|
|
357
|
+
*/
|
|
358
|
+
allowed_outbound_country_list?: Array<string> | null;
|
|
359
|
+
/**
|
|
360
|
+
* The password used for authentication for the SIP trunk to update for the phone
|
|
361
|
+
* number.
|
|
362
|
+
*/
|
|
363
|
+
auth_password?: string;
|
|
364
|
+
/**
|
|
365
|
+
* The username used for authentication for the SIP trunk to update for the phone
|
|
366
|
+
* number.
|
|
367
|
+
*/
|
|
368
|
+
auth_username?: string;
|
|
369
|
+
/**
|
|
370
|
+
* Enterprise only. Phone number to transfer inbound calls to when organization is
|
|
371
|
+
* in outage mode. Can be either a Retell phone number or an external number. Set
|
|
372
|
+
* to null to remove. Cannot be the same as this phone number, and cannot be a
|
|
373
|
+
* number that already has its own fallback configured (prevents nested
|
|
374
|
+
* forwarding).
|
|
375
|
+
*/
|
|
376
|
+
fallback_number?: string | null;
|
|
188
377
|
/**
|
|
189
378
|
* Unique id of agent to bind to the number. The number will automatically use the
|
|
190
379
|
* agent when receiving inbound calls. If set to null, this number would not accept
|
|
@@ -196,6 +385,25 @@ export interface PhoneNumberUpdateParams {
|
|
|
196
385
|
* default to latest version.
|
|
197
386
|
*/
|
|
198
387
|
inbound_agent_version?: number | null;
|
|
388
|
+
/**
|
|
389
|
+
* Inbound agents to bind to the number with weights. If set and non-empty, one
|
|
390
|
+
* agent will be picked randomly for each inbound call, with probability
|
|
391
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
392
|
+
* fallback to inbound_agent_id.
|
|
393
|
+
*/
|
|
394
|
+
inbound_agents?: Array<PhoneNumberUpdateParams.InboundAgent> | null;
|
|
395
|
+
/**
|
|
396
|
+
* Inbound SMS agents to bind to the number with weights. If set and non-empty, one
|
|
397
|
+
* agent will be picked randomly for each inbound SMS, with probability
|
|
398
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
399
|
+
* fallback to inbound_sms_agent_id.
|
|
400
|
+
*/
|
|
401
|
+
inbound_sms_agents?: Array<PhoneNumberUpdateParams.InboundSMSAgent> | null;
|
|
402
|
+
/**
|
|
403
|
+
* If set, will send a webhook for inbound SMS, where you can override agent id,
|
|
404
|
+
* set dynamic variables and other fields specific to that chat.
|
|
405
|
+
*/
|
|
406
|
+
inbound_sms_webhook_url?: string | null;
|
|
199
407
|
/**
|
|
200
408
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
201
409
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -216,6 +424,68 @@ export interface PhoneNumberUpdateParams {
|
|
|
216
424
|
* default to latest version.
|
|
217
425
|
*/
|
|
218
426
|
outbound_agent_version?: number | null;
|
|
427
|
+
/**
|
|
428
|
+
* Outbound agents to bind to the number with weights. If set and non-empty, one
|
|
429
|
+
* agent will be picked randomly for each outbound call, with probability
|
|
430
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
431
|
+
* fallback to outbound_agent_id.
|
|
432
|
+
*/
|
|
433
|
+
outbound_agents?: Array<PhoneNumberUpdateParams.OutboundAgent> | null;
|
|
434
|
+
/**
|
|
435
|
+
* Outbound SMS agents to bind to the number with weights. If set and non-empty,
|
|
436
|
+
* one agent will be picked randomly for each outbound SMS, with probability
|
|
437
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
438
|
+
* fallback to outbound_sms_agent_id.
|
|
439
|
+
*/
|
|
440
|
+
outbound_sms_agents?: Array<PhoneNumberUpdateParams.OutboundSMSAgent> | null;
|
|
441
|
+
/**
|
|
442
|
+
* The termination uri to update for the phone number. This is used for outbound
|
|
443
|
+
* calls.
|
|
444
|
+
*/
|
|
445
|
+
termination_uri?: string;
|
|
446
|
+
/**
|
|
447
|
+
* Outbound transport protocol to update for the phone number. Valid values are
|
|
448
|
+
* "TLS", "TCP" and "UDP". Default is "TCP".
|
|
449
|
+
*/
|
|
450
|
+
transport?: string | null;
|
|
451
|
+
}
|
|
452
|
+
export declare namespace PhoneNumberUpdateParams {
|
|
453
|
+
interface InboundAgent {
|
|
454
|
+
agent_id: string;
|
|
455
|
+
/**
|
|
456
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
457
|
+
* add up to 1.
|
|
458
|
+
*/
|
|
459
|
+
weight: number;
|
|
460
|
+
agent_version?: number;
|
|
461
|
+
}
|
|
462
|
+
interface InboundSMSAgent {
|
|
463
|
+
agent_id: string;
|
|
464
|
+
/**
|
|
465
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
466
|
+
* add up to 1.
|
|
467
|
+
*/
|
|
468
|
+
weight: number;
|
|
469
|
+
agent_version?: number;
|
|
470
|
+
}
|
|
471
|
+
interface OutboundAgent {
|
|
472
|
+
agent_id: string;
|
|
473
|
+
/**
|
|
474
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
475
|
+
* add up to 1.
|
|
476
|
+
*/
|
|
477
|
+
weight: number;
|
|
478
|
+
agent_version?: number;
|
|
479
|
+
}
|
|
480
|
+
interface OutboundSMSAgent {
|
|
481
|
+
agent_id: string;
|
|
482
|
+
/**
|
|
483
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
484
|
+
* add up to 1.
|
|
485
|
+
*/
|
|
486
|
+
weight: number;
|
|
487
|
+
agent_version?: number;
|
|
488
|
+
}
|
|
219
489
|
}
|
|
220
490
|
export interface PhoneNumberImportParams {
|
|
221
491
|
/**
|
|
@@ -230,6 +500,16 @@ export interface PhoneNumberImportParams {
|
|
|
230
500
|
* ".pstn.twilio.com".
|
|
231
501
|
*/
|
|
232
502
|
termination_uri: string;
|
|
503
|
+
/**
|
|
504
|
+
* List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed.
|
|
505
|
+
* If not set or empty, calls from all countries are allowed.
|
|
506
|
+
*/
|
|
507
|
+
allowed_inbound_country_list?: Array<string> | null;
|
|
508
|
+
/**
|
|
509
|
+
* List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If
|
|
510
|
+
* not set or empty, calls to all countries are allowed.
|
|
511
|
+
*/
|
|
512
|
+
allowed_outbound_country_list?: Array<string> | null;
|
|
233
513
|
/**
|
|
234
514
|
* Unique id of agent to bind to the number. The number will automatically use the
|
|
235
515
|
* agent when receiving inbound calls. If null, this number would not accept
|
|
@@ -241,6 +521,13 @@ export interface PhoneNumberImportParams {
|
|
|
241
521
|
* default to latest version.
|
|
242
522
|
*/
|
|
243
523
|
inbound_agent_version?: number | null;
|
|
524
|
+
/**
|
|
525
|
+
* Inbound agents to bind to the number with weights. If set and non-empty, one
|
|
526
|
+
* agent will be picked randomly for each inbound call, with probability
|
|
527
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
528
|
+
* fallback to inbound_agent_id.
|
|
529
|
+
*/
|
|
530
|
+
inbound_agents?: Array<PhoneNumberImportParams.InboundAgent> | null;
|
|
244
531
|
/**
|
|
245
532
|
* If set, will send a webhook for inbound calls, where you can to override agent
|
|
246
533
|
* id, set dynamic variables and other fields specific to that call.
|
|
@@ -255,12 +542,19 @@ export interface PhoneNumberImportParams {
|
|
|
255
542
|
* agent when conducting outbound calls. If null, this number would not be able to
|
|
256
543
|
* initiate outbound call without agent id override.
|
|
257
544
|
*/
|
|
258
|
-
outbound_agent_id?: string;
|
|
545
|
+
outbound_agent_id?: string | null;
|
|
259
546
|
/**
|
|
260
547
|
* Version of the outbound agent to bind to the number. If not provided, will
|
|
261
548
|
* default to latest version.
|
|
262
549
|
*/
|
|
263
550
|
outbound_agent_version?: number | null;
|
|
551
|
+
/**
|
|
552
|
+
* Outbound agents to bind to the number with weights. If set and non-empty, one
|
|
553
|
+
* agent will be picked randomly for each outbound call, with probability
|
|
554
|
+
* proportional to the weight. Total weights must add up to 1. If not set or empty,
|
|
555
|
+
* fallback to outbound_agent_id.
|
|
556
|
+
*/
|
|
557
|
+
outbound_agents?: Array<PhoneNumberImportParams.OutboundAgent> | null;
|
|
264
558
|
/**
|
|
265
559
|
* The password used for authentication for the SIP trunk.
|
|
266
560
|
*/
|
|
@@ -269,6 +563,31 @@ export interface PhoneNumberImportParams {
|
|
|
269
563
|
* The username used for authentication for the SIP trunk.
|
|
270
564
|
*/
|
|
271
565
|
sip_trunk_auth_username?: string;
|
|
566
|
+
/**
|
|
567
|
+
* Outbound transport protocol to update for the phone number. Valid values are
|
|
568
|
+
* "TLS", "TCP" and "UDP". Default is "TCP".
|
|
569
|
+
*/
|
|
570
|
+
transport?: string | null;
|
|
571
|
+
}
|
|
572
|
+
export declare namespace PhoneNumberImportParams {
|
|
573
|
+
interface InboundAgent {
|
|
574
|
+
agent_id: string;
|
|
575
|
+
/**
|
|
576
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
577
|
+
* add up to 1.
|
|
578
|
+
*/
|
|
579
|
+
weight: number;
|
|
580
|
+
agent_version?: number;
|
|
581
|
+
}
|
|
582
|
+
interface OutboundAgent {
|
|
583
|
+
agent_id: string;
|
|
584
|
+
/**
|
|
585
|
+
* The weight of the agent. When used in a list of agents, the total weights must
|
|
586
|
+
* add up to 1.
|
|
587
|
+
*/
|
|
588
|
+
weight: number;
|
|
589
|
+
agent_version?: number;
|
|
590
|
+
}
|
|
272
591
|
}
|
|
273
592
|
export declare namespace PhoneNumber {
|
|
274
593
|
export { type PhoneNumberResponse as PhoneNumberResponse, type PhoneNumberListResponse as PhoneNumberListResponse, type PhoneNumberCreateParams as PhoneNumberCreateParams, type PhoneNumberUpdateParams as PhoneNumberUpdateParams, type PhoneNumberImportParams as PhoneNumberImportParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-number.d.ts","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"phone-number.d.ts","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAIhG;;;;;;;;OAQG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAIxF;;;;;;;;;;;;;;OAcG;I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CAAC;QAEjB;;;WAGG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.PhoneNumber = void 0;
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
6
8
|
class PhoneNumber extends resource_1.APIResource {
|
|
7
9
|
/**
|
|
8
10
|
* Buy a new phone number & Bind agents
|
|
@@ -26,7 +28,7 @@ class PhoneNumber extends resource_1.APIResource {
|
|
|
26
28
|
* ```
|
|
27
29
|
*/
|
|
28
30
|
retrieve(phoneNumber, options) {
|
|
29
|
-
return this._client.get(`/get-phone-number/${phoneNumber}`, options);
|
|
31
|
+
return this._client.get((0, path_1.path) `/get-phone-number/${phoneNumber}`, options);
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* Update agent bound to a purchased phone number
|
|
@@ -44,7 +46,7 @@ class PhoneNumber extends resource_1.APIResource {
|
|
|
44
46
|
* ```
|
|
45
47
|
*/
|
|
46
48
|
update(phoneNumber, body, options) {
|
|
47
|
-
return this._client.patch(`/update-phone-number/${phoneNumber}`, { body, ...options });
|
|
49
|
+
return this._client.patch((0, path_1.path) `/update-phone-number/${phoneNumber}`, { body, ...options });
|
|
48
50
|
}
|
|
49
51
|
/**
|
|
50
52
|
* List all phone numbers
|
|
@@ -67,9 +69,9 @@ class PhoneNumber extends resource_1.APIResource {
|
|
|
67
69
|
* ```
|
|
68
70
|
*/
|
|
69
71
|
delete(phoneNumber, options) {
|
|
70
|
-
return this._client.delete(`/delete-phone-number/${phoneNumber}`, {
|
|
72
|
+
return this._client.delete((0, path_1.path) `/delete-phone-number/${phoneNumber}`, {
|
|
71
73
|
...options,
|
|
72
|
-
headers: { Accept: '*/*',
|
|
74
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-number.js","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"phone-number.js","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,WAAmB,EACnB,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,wBAAwB,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,wBAAwB,WAAW,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AA9FD,kCA8FC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
3
5
|
export class PhoneNumber extends APIResource {
|
|
4
6
|
/**
|
|
5
7
|
* Buy a new phone number & Bind agents
|
|
@@ -23,7 +25,7 @@ export class PhoneNumber extends APIResource {
|
|
|
23
25
|
* ```
|
|
24
26
|
*/
|
|
25
27
|
retrieve(phoneNumber, options) {
|
|
26
|
-
return this._client.get(`/get-phone-number/${phoneNumber}`, options);
|
|
28
|
+
return this._client.get(path `/get-phone-number/${phoneNumber}`, options);
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Update agent bound to a purchased phone number
|
|
@@ -41,7 +43,7 @@ export class PhoneNumber extends APIResource {
|
|
|
41
43
|
* ```
|
|
42
44
|
*/
|
|
43
45
|
update(phoneNumber, body, options) {
|
|
44
|
-
return this._client.patch(`/update-phone-number/${phoneNumber}`, { body, ...options });
|
|
46
|
+
return this._client.patch(path `/update-phone-number/${phoneNumber}`, { body, ...options });
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* List all phone numbers
|
|
@@ -64,9 +66,9 @@ export class PhoneNumber extends APIResource {
|
|
|
64
66
|
* ```
|
|
65
67
|
*/
|
|
66
68
|
delete(phoneNumber, options) {
|
|
67
|
-
return this._client.delete(`/delete-phone-number/${phoneNumber}`, {
|
|
69
|
+
return this._client.delete(path `/delete-phone-number/${phoneNumber}`, {
|
|
68
70
|
...options,
|
|
69
|
-
headers: { Accept: '*/*',
|
|
71
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
70
72
|
});
|
|
71
73
|
}
|
|
72
74
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-number.mjs","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"phone-number.mjs","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAA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